Spaces:
Paused
Paused
File size: 987 Bytes
83a59ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | services:
postgres:
image: postgres:alpine
environment:
POSTGRES_DB: httpsms
POSTGRES_PASSWORD: dbpassword
POSTGRES_USER: dbusername
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "5435:5432"
restart: on-failure
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 30s
timeout: 60s
retries: 5
start_period: 5s
redis:
image: redis:latest
command: redis-server
volumes:
- redis:/var/lib/redis
ports:
- "6379:6379"
restart: on-failure
api:
build:
context: ./api
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
env_file:
- ./api/.env
web:
build:
context: ./web
ports:
- "3000:3000"
depends_on:
api:
condition: service_started
volumes:
redis:
postgres:
|