Skip to content

Commit

Permalink
Track Dockerfiles accross instances. (#2593)
Browse files Browse the repository at this point in the history
* Track Dockerfiles accross instances.

* Specify jessie as base
  • Loading branch information
icarito authored and jywarren committed May 25, 2018
1 parent 8617ad2 commit c62f7f7
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dockerfile # Plots2
# https://github.com/publiclab/plots2

FROM ruby:2.3
FROM ruby:2.3-jessie

LABEL maintainer="Sebastian Silva <sebastian@fuentelibre.org>"
LABEL description="This image deploys Plots2."
Expand Down
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 c62f7f7

Please sign in to comment.