1
0
Fork 0
spejstore-new/docker-compose.yml

38 lines
966 B
YAML
Raw Normal View History

version: "3"
2016-09-29 20:20:10 +00:00
services:
db:
2023-08-17 12:20:00 +00:00
image: postgres:15.4
2017-10-22 21:51:22 +00:00
restart: always
environment:
2023-07-17 21:08:24 +00:00
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
healthcheck:
#CHANGE 1: this command checks if the database is ready, right on the source db server
2023-11-06 19:50:00 +00:00
test: ["CMD-SHELL", "pg_isready -d postgres -U postgres"]
interval: 1s
timeout: 1s
retries: 5
2016-09-29 20:20:10 +00:00
web:
2023-08-18 11:00:53 +00:00
build: .
2017-10-22 21:51:22 +00:00
restart: always
2023-07-17 13:47:29 +00:00
command: bash -c "python manage.py migrate && gunicorn -b 0.0.0.0:8000 --capture-output --error-logfile - --access-logfile - spejstore.wsgi:application"
2016-09-29 20:20:10 +00:00
volumes:
- .:/code
2023-08-17 12:21:10 +00:00
- /code/build_static
2016-09-29 20:20:10 +00:00
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
2024-01-13 22:30:50 +00:00
env_file:
- path: .env
required: true
- path: ./spejstore-dev.env
required: false
environment:
- SPEJSTORE_CLIENT_ID
- SPEJSTORE_SECRET
- SPEJSTORE_ENV