Permalink
Browse files

Update docker and volumes

Docker compose config version 3.
Keep dbbackups folder from being owned by root.
Migrate from deprecated onbuild python images.
  • Loading branch information...
WhiteHalmos committed Nov 4, 2017
1 parent d27c4ae commit 0fcf4c7bd59bbb3e43c74f59d3a1d8760279cad3
Showing with 27 additions and 13 deletions.
  1. 0 dbbackups/.gitkeep
  2. +9 −11 docker-compose.yml
  3. +9 −1 matchmaker/Dockerfile
  4. +9 −1 webapp/Dockerfile
View
No changes.
View
@@ -1,21 +1,16 @@
version: '2'
version: '3'
services:
dbdata:
command: Data-only container for rgserver
entrypoint: /bin/echo
image: postgres:9.4
db:
image: postgres:9.4
environment:
- POSTGRES_USER=robot
image: postgres:9.4
volumes:
- ./sql/schema.sql:/docker-entrypoint-initdb.d/schema.sql
volumes_from:
- dbdata
- dbdata:/var/lib/postgresql/data
matchmaker:
build: matchmaker
depends_on:
- db
build: matchmaker
volumes:
- ./matchlog:/matchlog
- ./matchmaker:/usr/src/app
@@ -24,20 +19,23 @@ services:
volumes:
- ./webapp:/usr/src/app
server:
image: nginx:1.9
depends_on:
- webapp
image: nginx:1.9
ports:
- '8000:80'
volumes:
- ./matchlog:/matchlog
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./static:/static
run:
image: postgres:9.4
command: One-off runner for rgserver
entrypoint: /bin/echo
image: postgres:9.4
volumes:
- ./dbbackups:/dbbackups
- ./matchlog:/matchlog
- ./sql:/sql
- dbdata:/var/lib/postgresql/data
volumes:
dbdata:
View
@@ -1,3 +1,11 @@
FROM python:2.7-onbuild
FROM python:2.7
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
CMD ["./matchmaker.py"]
View
@@ -1,4 +1,12 @@
FROM python:2.7-onbuild
FROM python:2.7
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
EXPOSE 3031

0 comments on commit 0fcf4c7

Please sign in to comment.