-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enables a demo using Docker to be ran locally
This commit adds a Dockerfile and entrypoint in the lib/demo folder, as well as useful documentation in the README file. This demo allows users to test out the latest version of solidus using Docker locally. This setup is very flexible and provides another option besides using Heroku or manually installing everything.
- Loading branch information
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# This image is intended to be used to test and demo Solidus | ||
# it is not intended for production purposes | ||
# | ||
FROM ruby:2.5.1 | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - | ||
|
||
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | ||
|
||
RUN mkdir /solidus | ||
|
||
WORKDIR /solidus | ||
|
||
ADD . /solidus | ||
|
||
RUN bundle install | ||
|
||
RUN bundle exec rake sandbox | ||
|
||
CMD ["sh", "./lib/demo/docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Solidus Docker Demo | ||
The Dockerfile in this folder is intended for demoing purposes, meaning that a | ||
user can run an installation of Solidus using a Docker container. | ||
|
||
## How to build the image | ||
Make sure Docker is installed in your local and run the following command: | ||
|
||
```shell | ||
docker build -t solidusio/solidus-demo:latest -f lib/demo/Dockerfile . | ||
``` | ||
|
||
## How to run the image | ||
You can either run the image you built locally or run the official image pushed | ||
in Dockerhub. | ||
|
||
```shell | ||
docker run --rm -it -p 3000:3000 solidusio/solidus-demo:latest | ||
``` | ||
|
||
## How to push the image | ||
If you want to push the image you can use the following command, just note that | ||
this specific command will push the image to the official Solidus Dockerhub | ||
account. | ||
|
||
```shell | ||
docker push solidusio/solidus-demo:latest | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
export RAILS_ENV=development | ||
|
||
cd sandbox && \ | ||
bundle exec rails s -p 3000 -b '0.0.0.0' |