Merge pull request #13 from offbyone/master

Dockerize magnetico as a pair of conjoined containers
This commit is contained in:
Bora M. Alper 2017-04-16 22:08:37 +04:00 committed by GitHub
commit 7ffe670147
5 changed files with 43 additions and 0 deletions

20
docker-compose.yml Normal file
View File

@ -0,0 +1,20 @@
version: "2"
volumes:
shared_db:
services:
magneticod:
build:
context: magneticod
volumes:
- shared_db:/root/.local/share
magneticow:
build:
context: magneticow
volumes:
- shared_db:/root/.local/share
ports:
- "12345:8080"

2
magneticod/.dockerignore Normal file
View File

@ -0,0 +1,2 @@
Dockerfile
.dockerignore

9
magneticod/Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM python:3.6
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . .
RUN pip install -e .
CMD ["python", "-mmagneticod"]

2
magneticow/.dockerignore Normal file
View File

@ -0,0 +1,2 @@
Dockerfile
.dockerignore

10
magneticow/Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM python:3.6
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . .
RUN pip install -e .
EXPOSE 8080
CMD ["python", "-mmagneticow", "--port", "8080", "--user", "user", "password"]