diff --git a/Makefile b/Makefile index cb461c3..81b3215 100644 --- a/Makefile +++ b/Makefile @@ -32,3 +32,6 @@ deploy-logs: ## Show container logs deploy-static: ## Collect static docker run --rm --env-file=.env xmrauctions ./manage.py collectstatic --no-input + +deploy-migrations: ## Run migrations + docker run --rm --env-file=.env --net=xmrauctions_default xmrauctions ./manage.py migrate diff --git a/docker-compose.deploy.yaml b/docker-compose.deploy.yaml index ac4614e..789e2f3 100644 --- a/docker-compose.deploy.yaml +++ b/docker-compose.deploy.yaml @@ -7,13 +7,12 @@ services: command: [".venv/bin/gunicorn", "-b", "0.0.0.0:8000", "xmrauctions.wsgi"] ports: - 8000:8000 - migrations: - env_file: - - .env - image: xmrauctions:latest - command: ["./manage.py", "migrate"] + depends_on: + - "db" huey: env_file: - .env image: xmrauctions:latest command: ["./manage.py", "run_huey"] + depends_on: + - "db"