Skip to content

Commit c62f7f7

Browse files
icaritojywarren
authored andcommitted
Track Dockerfiles accross instances. (#2593)
* Track Dockerfiles accross instances. * Specify jessie as base
1 parent 8617ad2 commit c62f7f7

4 files changed

+93
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dockerfile # Plots2
22
# https://github.com/publiclab/plots2
33

4-
FROM ruby:2.3
4+
FROM ruby:2.3-jessie
55

66
LABEL maintainer="Sebastian Silva <sebastian@fuentelibre.org>"
77
LABEL description="This image deploys Plots2."
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: "2"
2+
services:
3+
db:
4+
ports:
5+
- "127.0.0.1:3307:3306"
6+
image: mariadb:10.2
7+
restart: unless-stopped
8+
environment:
9+
- MYSQL_DATABASE=plots_$RAILS_ENV
10+
- MYSQL_USER=plots
11+
- MYSQL_PASSWORD=plots
12+
- MYSQL_RANDOM_ROOT_PASSWORD=true
13+
volumes:
14+
- ./config/my.cnf:/etc/mysql/my.cnf
15+
# for configuration
16+
- ../mysql:/var/lib/mysql
17+
# for persistence
18+
- ../dump:/docker-entrypoint-initdb.d
19+
# for importing a dump
20+
# if you want to re-import simply put away ../mysql/*
21+
# web:
22+
# build: .
23+
# command: /bin/bash -c "sleep 5 && bundle exec rails s -p 4000 -b '0.0.0.0'"
24+
# environment:
25+
# - RAILS_ENV=${RAILS_ENV}
26+
# volumes:
27+
# - .:/app
28+
# ports:
29+
# - "127.0.0.1:4001:4000"
30+
# links:
31+
# - db
32+
# restart: unless-stopped

containers/docker-compose-stable.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: "2"
2+
services:
3+
db:
4+
image: mariadb:10.2
5+
environment:
6+
- MYSQL_DATABASE=plots
7+
- MYSQL_USER=plots
8+
- MYSQL_PASSWORD=plots
9+
- MYSQL_RANDOM_ROOT_PASSWORD=true
10+
volumes:
11+
- ../mysql:/var/lib/mysql
12+
# for persistence
13+
- ../dump:/docker-entrypoint-initdb.d
14+
# for importing a dump
15+
# if you want to re-import simply put away ../mysql/*
16+
web:
17+
build: .
18+
command: /bin/bash -c "sleep 5 && passenger start -p 4000"
19+
environment:
20+
- RAILS_ENV=${RAILS_ENV}
21+
- SOLR_URL=${SOLR_URL}
22+
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
23+
- DISABLE_SOLR_CHECK=1
24+
volumes:
25+
- .:/app
26+
ports:
27+
- "127.0.0.1:4000:4000"
28+
links:
29+
- db
30+
# restart: unless-stopped
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: "2"
2+
services:
3+
db:
4+
image: mariadb:10.2
5+
environment:
6+
- MYSQL_DATABASE=plots
7+
- MYSQL_USER=plots
8+
- MYSQL_PASSWORD=plots
9+
- MYSQL_RANDOM_ROOT_PASSWORD=true
10+
volumes:
11+
- ./config/my.cnf:/etc/mysql/my.cnf
12+
# for configuration
13+
- ../mysql:/var/lib/mysql
14+
# for persistence
15+
- ../dump:/docker-entrypoint-initdb.d
16+
# for importing a dump
17+
# if you want to re-import simply put away ../mysql/*
18+
web:
19+
build: .
20+
command: /bin/bash -c "sleep 5 && passenger start -p 5001"
21+
environment:
22+
- RAILS_ENV=${RAILS_ENV}
23+
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
24+
volumes:
25+
- .:/app
26+
ports:
27+
- "127.0.0.1:5001:5001"
28+
links:
29+
- db
30+
# restart: unless-stopped

0 commit comments

Comments
 (0)