Skip to content

Commit

Permalink
Track Dockerfiles accross instances.
Browse files Browse the repository at this point in the history
  • Loading branch information
icarito committed Apr 8, 2018
1 parent 2f35d87 commit ef54ef4
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
32 changes: 32 additions & 0 deletions containers/docker-compose-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: "2"
services:
db:
ports:
- "127.0.0.1:3307:3306"
image: mariadb:10.2
restart: unless-stopped
environment:
- MYSQL_DATABASE=plots_$RAILS_ENV
- MYSQL_USER=plots
- MYSQL_PASSWORD=plots
- MYSQL_RANDOM_ROOT_PASSWORD=true
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
30 changes: 30 additions & 0 deletions containers/docker-compose-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: "2"
services:
db:
image: mariadb:10.2
environment:
- MYSQL_DATABASE=plots
- MYSQL_USER=plots
- MYSQL_PASSWORD=plots
- MYSQL_RANDOM_ROOT_PASSWORD=true
volumes:
- ../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 && 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
ports:
- "127.0.0.1:4000:4000"
links:
- db
# restart: unless-stopped
30 changes: 30 additions & 0 deletions containers/docker-compose-unstable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: "2"
services:
db:
image: mariadb:10.2
environment:
- MYSQL_DATABASE=plots
- MYSQL_USER=plots
- MYSQL_PASSWORD=plots
- MYSQL_RANDOM_ROOT_PASSWORD=true
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 && passenger start -p 5001"
environment:
- RAILS_ENV=${RAILS_ENV}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
volumes:
- .:/app
ports:
- "127.0.0.1:5001:5001"
links:
- db
# restart: unless-stopped

0 comments on commit ef54ef4

Please sign in to comment.