feat: update docker-compose.yml with cron and watchtower services
This commit is contained in:
@@ -16,10 +16,25 @@ services:
|
||||
- postgres
|
||||
command: ["/api"]
|
||||
|
||||
cron:
|
||||
build: .
|
||||
environment:
|
||||
- REDIS_ADDR=redis:6379
|
||||
- POSTGRES_DATABASE=trip_planner
|
||||
- POSTGRES_USER=trip_planner
|
||||
- POSTGRES_PASSWORD=trip_planner
|
||||
- POSTGRES_HOST=postgres
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
command: ["/cron"]
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
@@ -32,5 +47,12 @@ services:
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
watchtower:
|
||||
image: nickfedor/watchtower:latest
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
command: --interval 60 --cleanup travel-api
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
Reference in New Issue
Block a user