Skip to content

Commit

Permalink
Updating example run script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Aug 11, 2020
1 parent 4834f41 commit c5f269e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

# An example script to run the app in production. It uses data volumes under the $DATA_ROOT directory.
# By default /srv. It uses a MongoDB database, tozd/meteor-mongodb image which is automatically run as well.
# Moreover, the example uses tozd/docker-hosts for service discovery. Feel free to use Docker container linking instead.

NAME='example'
DATA_ROOT='/srv'
Expand Down Expand Up @@ -40,12 +39,15 @@ docker stop "${NAME}_mongodb" || true
sleep 1
docker rm "${NAME}_mongodb" || true
sleep 1
# Mounted volume "/srv/var/hosts:/etc/hosts:ro" is used by tozd/docker-hosts service discovery and can be removed.
docker run --detach=true --restart=always --name "${NAME}_mongodb" --hostname "${NAME}_mongodb" --volume /srv/var/hosts:/etc/hosts:ro --volume "${CONFIG}:/etc/service/mongod/run.config" --volume "${MONGODB_LOG}:/var/log/mongod" --volume "${MONGODB_DATA}:/var/lib/mongodb" tozd/meteor-mongodb:2.6
docker run --detach=true --restart=always --name "${NAME}_mongodb" --hostname "${NAME}_mongodb" \
-volume "${CONFIG}:/etc/service/mongod/run.config" --volume "${MONGODB_LOG}:/var/log/mongod" --volume "${MONGODB_DATA}:/var/lib/mongodb" \
tozd/meteor-mongodb:3.4

docker stop "${NAME}" || true
sleep 1
docker rm "${NAME}" || true
sleep 1
# Mounted volume "/srv/var/hosts:/etc/hosts:ro" is used by tozd/docker-hosts service discovery and can be removed.
docker run --detach=true --restart=always --name "${NAME}" --hostname "${NAME}" --env ROOT_URL=http://example.com --env MAIL_URL=smtp://example.com --volume /srv/var/hosts:/etc/hosts:ro --volume "${CONFIG}:/etc/service/meteor/run.config" --volume "${METEOR_LOG}:/var/log/meteor" --volume "${METEOR_STORAGE}:/storage" you/example-app
docker run --detach=true --restart=always --name "${NAME}" --hostname "${NAME}" \
--env ROOT_URL=http://example.com --env MAIL_URL=smtp://example.com \
--volume "${CONFIG}:/etc/service/meteor/run.config" --volume "${METEOR_LOG}:/var/log/meteor" \
you/example-app

0 comments on commit c5f269e

Please sign in to comment.