build(deployment): use local backend and frontend build contexts
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
services:
|
||||
db:
|
||||
services:
|
||||
db:
|
||||
image: postgres:18-alpine
|
||||
restart: always
|
||||
env_file:
|
||||
@@ -26,20 +26,20 @@ services:
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: qlockify-deployment/backend/Dockerfile
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
volumes:
|
||||
- static_data:/app/staticfiles
|
||||
- media_data:/app/mediafiles
|
||||
command: >
|
||||
sh -c "python manage.py migrate &&
|
||||
python manage.py collectstatic --noinput &&
|
||||
gunicorn config.wsgi:application --bind 0.0.0.0:8000"
|
||||
expose:
|
||||
- "8000"
|
||||
volumes:
|
||||
- static_data:/app/staticfiles
|
||||
- media_data:/app/mediafiles
|
||||
command: >
|
||||
sh -c "python manage.py migrate &&
|
||||
python manage.py collectstatic --noinput &&
|
||||
gunicorn config.wsgi:application --bind 0.0.0.0:8000"
|
||||
expose:
|
||||
- "8000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@@ -48,14 +48,14 @@ services:
|
||||
|
||||
celery:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: qlockify-deployment/backend/Dockerfile
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
volumes:
|
||||
- media_data:/app/mediafiles
|
||||
command: celery -A config worker -l INFO
|
||||
command: celery -A config worker -l INFO
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@@ -66,8 +66,8 @@ services:
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: qlockify-deployment/frontend/Dockerfile
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
restart: always
|
||||
env_file:
|
||||
- ./frontend/.env
|
||||
@@ -89,7 +89,7 @@ services:
|
||||
- backend
|
||||
- frontend
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
static_data:
|
||||
media_data:
|
||||
volumes:
|
||||
postgres_data:
|
||||
static_data:
|
||||
media_data:
|
||||
|
||||
Reference in New Issue
Block a user