Skip to content

Commit

Permalink
Merge pull request #628 from shankari/docker-cleanup
Browse files Browse the repository at this point in the history
Minor fixes to the docker setup
  • Loading branch information
shankari authored Jan 24, 2019
2 parents e76681b + c9225dd commit a15a8c7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ENV DB_HOST=''
ENV WEB_SERVER_HOST=''

#add start script.
# this is a redundant workdir setting, but it doesn't harm anything and might
# be useful if the other one is removed for some reason
WORKDIR /usr/src/app
ADD start_script.sh /usr/src/app/start_script.sh
RUN chmod u+x /usr/src/app/start_script.sh
Expand Down
16 changes: 12 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Docker usage instructions
This project is now published on dockerhub!
https://hub.docker.com/r/emission/e-mission-server/
and https://hub.docker.com/r/emission/e-mission-server-base/

Both the standard Dockerfile and the docker-compose.yml are in this directory (docker) and should be specified using `-f`. Once we split out the docker stuff into a separate repository, this should become simpler.

Instructions on re-building the image are [in the build instructions](#Docker_Build_Instructions)

1. Initialize Swarm
1. (optional) If you want to use `swarm` for container management, initialize Swarm
```
docker swarm init
```
Expand All @@ -16,8 +17,15 @@ Instructions on re-building the image are [in the build instructions](#Docker_Bu
* Update the port mappings and environment variables if necessary.
For more details on how to configure compose files please see the official documentation: https://docs.docker.com/compose/compose-file/#service-configuration-reference

3. Deploy to swarm
```
3. Deploy directly

```
docker-compose -f docker/docker-compose.yml up -d
```

or to swarm if you initalized it in step 1

```
docker stack deploy -c docker-compose.yml emission
```
There are many ways you can manage your deployment. Again, please see the official documentation for more details: https://docs.docker.com/get-started/part4/
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
web-server:
image: emission-server
image: emission/e-mission-server:latest
depends_on:
- db
environment:
Expand Down Expand Up @@ -39,4 +39,4 @@ networks:
emission:

volumes:
mongo-data:
mongo-data:

0 comments on commit a15a8c7

Please sign in to comment.