diff --git a/Dockerfile-back b/Dockerfile-back new file mode 100644 index 0000000..1e27056 --- /dev/null +++ b/Dockerfile-back @@ -0,0 +1,6 @@ +FROM python:3.8-buster +COPY ./server /backend +WORKDIR /backend +RUN pip install -r requirements.txt +RUN mkdir -p /backend/assets/covers /backend/assets/audiobooks +CMD python app.py diff --git a/Dockerfile-front b/Dockerfile-front new file mode 100644 index 0000000..b0ec417 --- /dev/null +++ b/Dockerfile-front @@ -0,0 +1,6 @@ +FROM node:14.7-stretch +COPY ./client /frontend +WORKDIR /frontend +RUN npm install +RUN mkdir -p /frontend/public/assets/covers +CMD npm run serve diff --git a/docker-compose.yml b/docker-compose.yml index 1c117e2..cfc25e4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,41 +2,35 @@ version: '3' services: frontend: - image: node:14.7-stretch + build: + context: . + dockerfile: Dockerfile-front environment: - VUE_APP_BACKEND_SCHEME=${TONIE_AUDIO_MATCH_BACKEND_SCHEME} - VUE_APP_BACKEND_HOST=${TONIE_AUDIO_MATCH_BACKEND_HOST} - VUE_APP_BACKEND_PORT=${TONIE_AUDIO_MATCH_BACKEND_PORT} - command: > - bash -c "cd /frontend && - npm install && - npm run serve" networks: - toniebox ports: - ${TONIE_AUDIO_MATCH_FRONTEND_PORT}:8080 volumes: - - ./client/:/frontend - ./albumart/:/frontend/public/assets/covers backend: - image: python:3.8-buster + build: + context: . + dockerfile: Dockerfile-back environment: - TONIE_AUDIO_MATCH_MEDIA_PATH - TONIE_AUDIO_MATCH_USER - TONIE_AUDIO_MATCH_PASS - command: > - bash -c "cd /backend && - pip install -r requirements.txt && - python app.py" networks: - toniebox ports: - ${TONIE_AUDIO_MATCH_BACKEND_PORT}:5000 volumes: - - ./server/:/backend - ./albumart/:/backend/assets/covers - ${TONIE_AUDIO_MATCH_MEDIA_PATH}:/backend/assets/audiobooks networks: - toniebox: \ No newline at end of file + toniebox: