Skip to content

Commit

Permalink
Update container definitions to match actual files used. (publiclab#2791
Browse files Browse the repository at this point in the history
)

* Update container definitions to match actual files used.

* Fix paths for running docker-compose.yml from subdir

* Fix reference to Dockerfile
  • Loading branch information
icarito authored and SidharthBansal committed Jun 19, 2018
1 parent 4cdbfd7 commit e803580
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 46 deletions.
37 changes: 9 additions & 28 deletions containers/docker-compose-production.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
version: "2"
services:
db:
ports:
- "127.0.0.1:3307:3306"
image: mariadb:10.2
restart: unless-stopped
web:
build: .
network_mode: "host"
command: /bin/bash -c "sleep 5 && passenger start --max-pool-size 9 --min-instances 9 -p 4001 -a 127.0.0.1"
environment:
- MYSQL_DATABASE=plots_$RAILS_ENV
- MYSQL_USER=plots
- MYSQL_PASSWORD=plots
- MYSQL_RANDOM_ROOT_PASSWORD=true
- RAILS_ENV=${RAILS_ENV}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
volumes:
- ./config/my.cnf:/etc/mysql/my.cnf
# for configuration
- ../mysql:/var/lib/mysql
# for persistence
- ../dump:/docker-entrypoint-initdb.d
# for importing a dump
# if you want to re-import simply put away ../mysql/*
# web:
# build: .
# command: /bin/bash -c "sleep 5 && bundle exec rails s -p 4000 -b '0.0.0.0'"
# environment:
# - RAILS_ENV=${RAILS_ENV}
# volumes:
# - .:/app
# ports:
# - "127.0.0.1:4001:4000"
# links:
# - db
# restart: unless-stopped
- .:/app
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
20 changes: 10 additions & 10 deletions containers/docker-compose-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ services:
- MYSQL_PASSWORD=plots
- MYSQL_RANDOM_ROOT_PASSWORD=true
volumes:
- ../mysql:/var/lib/mysql
- ../config/my.cnf:/etc/mysql/my.cnf
# for configuration
- ../../mysql:/var/lib/mysql
# for persistence
- ../dump:/docker-entrypoint-initdb.d
# for importing a dump
# if you want to re-import simply put away ../mysql/*
- ../../dump:/docker-entrypoint-initdb.d
# mporting a dump
# if you want to re-import simply put away ../../mysql/*
web:
build: .
command: /bin/bash -c "sleep 5 && passenger start -p 4000"
build: ..
command: /bin/bash -c "sleep 5 && /usr/local/bundle/bin/passenger start -p 4000"
environment:
- RAILS_ENV=${RAILS_ENV}
- SOLR_URL=${SOLR_URL}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- DISABLE_SOLR_CHECK=1
volumes:
- .:/app
- ..:/app
ports:
- "127.0.0.1:4000:4000"
links:
- db
# restart: unless-stopped
restart: unless-stopped
16 changes: 8 additions & 8 deletions containers/docker-compose-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ services:
- MYSQL_PASSWORD=plots
- MYSQL_RANDOM_ROOT_PASSWORD=true
volumes:
- ./config/my.cnf:/etc/mysql/my.cnf
- ../config/my.cnf:/etc/mysql/my.cnf
# for configuration
- ../mysql:/var/lib/mysql
- ../../mysql:/var/lib/mysql
# for persistence
- ../dump:/docker-entrypoint-initdb.d
- ../../dump:/docker-entrypoint-initdb.d
# for importing a dump
# if you want to re-import simply put away ../mysql/*
# if you want to re-import simply put away ../../mysql/*
web:
build: .
command: /bin/bash -c "sleep 5 && passenger start -p 5001"
build: ..
command: /bin/bash -c "sleep 5 && bundle exec rails s -p 5001 -b '0.0.0.0'"
environment:
- RAILS_ENV=${RAILS_ENV}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
volumes:
- .:/app
- ..:/app
ports:
- "127.0.0.1:5001:5001"
links:
- db
# restart: unless-stopped
restart: unless-stopped

0 comments on commit e803580

Please sign in to comment.