Dockerize magnetico as a pair of conjoined containers
docker-compose links them, they share a DB on a volume container, and expose the web interface on the host port 12345
This commit is contained in:
parent
f9cb28f31a
commit
dd40222fd6
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal 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
2
magneticod/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
9
magneticod/Dockerfile
Normal file
9
magneticod/Dockerfile
Normal 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
2
magneticow/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
10
magneticow/Dockerfile
Normal file
10
magneticow/Dockerfile
Normal 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"]
|
Loading…
Reference in New Issue
Block a user