diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2e52ae5 --- /dev/null +++ b/docker-compose.yml @@ -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" diff --git a/magneticod/.dockerignore b/magneticod/.dockerignore new file mode 100644 index 0000000..4a246ec --- /dev/null +++ b/magneticod/.dockerignore @@ -0,0 +1,2 @@ +Dockerfile +.dockerignore diff --git a/magneticod/Dockerfile b/magneticod/Dockerfile new file mode 100644 index 0000000..20e8809 --- /dev/null +++ b/magneticod/Dockerfile @@ -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"] diff --git a/magneticow/.dockerignore b/magneticow/.dockerignore new file mode 100644 index 0000000..4a246ec --- /dev/null +++ b/magneticow/.dockerignore @@ -0,0 +1,2 @@ +Dockerfile +.dockerignore diff --git a/magneticow/Dockerfile b/magneticow/Dockerfile new file mode 100644 index 0000000..2942164 --- /dev/null +++ b/magneticow/Dockerfile @@ -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"]