[fix] Reworks Docker

This commit is contained in:
alban 2020-11-05 16:50:20 +01:00
parent d1f1c32c03
commit d0288d3cc9
3 changed files with 8 additions and 6 deletions

View File

@ -15,10 +15,10 @@ RUN rm -f /etc/nginx/sites-enabled/*
RUN pip3 install flask numpy pillow redis
RUN pip3 install pypotrace
COPY ./files/nginx/sites-enabled/site.conf /etc/nginx/sites-enabled
COPY ./server/files/nginx/sites-enabled/site.conf /etc/nginx/sites-enabled
COPY . .
COPY entrypoint.sh /usr/bin/
COPY ./server/entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
EXPOSE 80

3
server/.env.template Normal file
View File

@ -0,0 +1,3 @@
DB_HOST="127.0.0.1"
DB_PORT="6379"
DEBUG=1

View File

@ -16,13 +16,13 @@ services:
app:
env_file: .env
build: .
build: ../
image: teamlaser/laser-app:latest
ports:
- "5000:5000"
depends_on:
- db
command: python ./server.py
command: python /opt/server.py
assets:
env_file: .env
@ -35,9 +35,8 @@ services:
worker:
env_file: .env
build: .
image: teamlaser/laser-app:latest
depends_on:
- db
command: bash -c "while true; do python ./worker.py; sleep 3; done"
command: bash -c "while true; do python /opt/worker.py; sleep 3; done"