removing migrations from docker-compose and using make command, add db dependency

pull/3/head
lalanza808 5 years ago
parent eb693f6ce0
commit 62298958bd

@ -32,3 +32,6 @@ deploy-logs: ## Show container logs
deploy-static: ## Collect static deploy-static: ## Collect static
docker run --rm --env-file=.env xmrauctions ./manage.py collectstatic --no-input 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

@ -7,13 +7,12 @@ services:
command: [".venv/bin/gunicorn", "-b", "0.0.0.0:8000", "xmrauctions.wsgi"] command: [".venv/bin/gunicorn", "-b", "0.0.0.0:8000", "xmrauctions.wsgi"]
ports: ports:
- 8000:8000 - 8000:8000
migrations: depends_on:
env_file: - "db"
- .env
image: xmrauctions:latest
command: ["./manage.py", "migrate"]
huey: huey:
env_file: env_file:
- .env - .env
image: xmrauctions:latest image: xmrauctions:latest
command: ["./manage.py", "run_huey"] command: ["./manage.py", "run_huey"]
depends_on:
- "db"