++
This commit is contained in:
@@ -1,42 +1,33 @@
|
||||
services:
|
||||
migrations:
|
||||
image: marbas:local
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
user: "1000:1000"
|
||||
volumes:
|
||||
- ./marbas:/app/marbas
|
||||
- ./api:/app/api
|
||||
- ./sde:/app/sde
|
||||
- ./authentication:/app/authentication
|
||||
- ./manage.py:/app/manage.py
|
||||
- ./static:/app/static
|
||||
command: sh -c "python manage.py makemigrations && python manage.py migrate"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
eveal:
|
||||
app_base: &app_base
|
||||
image: marbas:local
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
env_file:
|
||||
- .env
|
||||
user: "${UID:-1000}:${GID:-1000}"
|
||||
volumes:
|
||||
- .:/app:z
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
migrations:
|
||||
<<: *app_base
|
||||
command: sh -c "python manage.py makemigrations && python manage.py migrate"
|
||||
|
||||
import_sde:
|
||||
<<: *app_base
|
||||
command: python manage.py import_sde /app/static_eve/sde/fsd
|
||||
depends_on:
|
||||
migrations:
|
||||
condition: service_completed_successfully
|
||||
|
||||
eveal:
|
||||
<<: *app_base
|
||||
ports:
|
||||
- "8000:8000"
|
||||
user: "1000:1000"
|
||||
volumes:
|
||||
- ./marbas:/app/marbas
|
||||
- ./api:/app/api
|
||||
- ./sde:/app/sde
|
||||
- ./authentication:/app/authentication
|
||||
- ./manage.py:/app/manage.py
|
||||
- ./static_eve:/app/static_eve
|
||||
- ./static:/app/static
|
||||
command: ["uvicorn", "marbas.asgi:application", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||
healthcheck:
|
||||
test: python manage.py health_check
|
||||
@@ -48,8 +39,19 @@ services:
|
||||
condition: service_healthy
|
||||
migrations:
|
||||
condition: service_completed_successfully
|
||||
# elasticsearch:
|
||||
# condition: service_healthy
|
||||
import_sde:
|
||||
condition: service_completed_successfully
|
||||
|
||||
worker:
|
||||
<<: *app_base
|
||||
command: celery -A marbas worker -l info
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
db:
|
||||
condition: service_healthy
|
||||
migrations:
|
||||
condition: service_completed_successfully
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
@@ -64,7 +66,7 @@ services:
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- marbas_dbdata:/var/lib/postgresql/data
|
||||
- marbas_dbdata:/var/lib/postgresql/data:Z
|
||||
env_file:
|
||||
- .env
|
||||
healthcheck:
|
||||
|
||||
Reference in New Issue
Block a user