restart services in docker compose

This commit is contained in:
andy 2022-03-20 09:48:16 +00:00
parent 6292d6c3f0
commit cf1889c2b8

View File

@ -2,6 +2,7 @@ version: "3.9"
services: services:
web: web:
image: sarsoo/selector-web:latest image: sarsoo/selector-web:latest
restart: unless-stopped
ports: ports:
- "8080:80" - "8080:80"
depends_on: depends_on:
@ -14,6 +15,7 @@ services:
cli: cli:
image: sarsoo/selector-cli:latest image: sarsoo/selector-cli:latest
restart: unless-stopped
depends_on: depends_on:
- database - database
- redis - redis
@ -24,10 +26,12 @@ services:
redis: redis:
image: redis:alpine image: redis:alpine
restart: unless-stopped
ports: ports:
- "6379:6379" - "6379:6379"
database: database:
image: postgres image: postgres
restart: unless-stopped
ports: ports:
- "5432:5432" - "5432:5432"
env_file: .env # set POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB env_file: .env # set POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB