dokku shit
This commit is contained in:
57
docker-compose.yml
Normal file
57
docker-compose.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres
|
||||
volumes:
|
||||
- database:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=werkout
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
web:
|
||||
build: .
|
||||
command: >
|
||||
sh -c "python manage.py collectstatic --noinput && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
|
||||
volumes:
|
||||
- .:/code
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- POSTGRES_NAME=werkout
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- db
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
|
||||
celery:
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
command: celery -A werkout worker -l info
|
||||
volumes:
|
||||
- .:/code
|
||||
environment:
|
||||
- DB_HOST=db
|
||||
- DB_NAME=werkout
|
||||
- DB_USER=postgres
|
||||
- DB_PASS=postgres
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
- web
|
||||
|
||||
volumes:
|
||||
database:
|
||||
Reference in New Issue
Block a user