Skip to content
Snippets Groups Projects
Commit 0421ff0c authored by Matteo Parrucci's avatar Matteo Parrucci
Browse files

moved entrypoints into images, moved context into separate folders, mounting...

moved entrypoints into images, moved context into separate folders, mounting entrypoints only in dev
parent b28ac8b3
No related branches found
No related tags found
No related merge requests found
......@@ -23,5 +23,5 @@ RUN if [ "$DEBUG" = 1 ] ; then pip install -r requirements.dev.txt ; fi
RUN python -m spacy download en_core_web_sm
EXPOSE 8001
# TODO: prod vs dev requirements using docker-compose args
# TODO: in dev copiare anche i vscode settings
COPY entrypoint.sh /entrypoint.sh
CMD ["/entrypoint.sh"]
......@@ -19,8 +19,8 @@ services:
proxy:
tty: true
build:
context: .
dockerfile: proxy/Dockerfile
context: ./proxy
dockerfile: Dockerfile
volumes:
- ${myPhotos}:/data
- ${proMedia}:/protected_media
......@@ -31,10 +31,11 @@ services:
environment:
- DEBUG=1
build:
context: .
dockerfile: frontend/Dockerfile
context: ./frontend
dockerfile: Dockerfile
volumes:
- ${codedir}/librephotos-frontend:/usr/src/app
- ./frontend/entrypoint.sh:/entrypoint.sh
backend:
tty: true
......@@ -42,12 +43,11 @@ services:
environment:
- DEBUG=1
build:
context: .
dockerfile: backend/Dockerfile
context: ./backend
dockerfile: Dockerfile
args:
DEBUG: 1
volumes:
- ./backend/entrypoint.sh:/entrypoint.sh
- ${myPhotos}:/data
- ${proMedia}:/protected_media
- ${logLocation}:/logs
......@@ -56,6 +56,7 @@ services:
- ./vscode/server-extensions:/root/.vscode-server/extensions
- ./vscode/server-insiders-extensions:/root/.vscode-server-insiders/extensions
- ./vscode/settings.json:/code/.vscode/settings.json
- ./backend/entrypoint.sh:/entrypoint.sh
pgadmin:
image: dpage/pgadmin4
......
......@@ -34,19 +34,14 @@ services:
frontend:
image: reallibrephotos/librephotos-frontend:${tag}
command: /entrypoint.sh
restart: always
volumes:
- ./frontend/entrypoint.sh:/entrypoint.sh
depends_on:
- backend
backend:
image: reallibrephotos/librephotos:${tag}
restart: always
command: /entrypoint.sh
volumes:
- ./backend/entrypoint.sh:/entrypoint.sh
- ${myPhotos}:/data
- ${proMedia}:/protected_media
- ${logLocation}:/logs
......
......@@ -11,5 +11,5 @@ RUN npm install
RUN npm build
EXPOSE 3000
RUN ["chmod", "+x", "./run.sh" ]
COPY entrypoint.sh /entrypoint.sh
CMD ["/entrypoint.sh"]
FROM nginx
COPY proxy/nginx.conf /etc/nginx/nginx.conf
COPY nginx.conf /etc/nginx/nginx.conf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment