-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (39 loc) · 990 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (39 loc) · 990 Bytes
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
# docker-compose --env-file .env-prod up -d
version: "3.8"
name: web_hw13_app
services:
redis:
image: redis:alpine
expose:
- "${REDIS_PORT}"
# ports:
# - "${REDIS_PORT}:${REDIS_PORT}"
pg:
image: postgres
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USERNAME: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
expose:
- "${POSTGRES_PORT}"
# ports:
# - "${POSTGRES_PORT}:${POSTGRES_PORT}"
volumes:
- ./.postgres-data:/var/lib/postgresql/data
code :
build: ./
image: lexxai/web_hw13:latest
ports:
- "${APP_PORT}:${APP_PORT}"
env_file:
- ./.env-prod
depends_on:
- pg
- redis
healthcheck:
test: ["CMD", "curl","-f","-X","GET","http://localhost:${APP_PORT}/api/healthchecker","-H","accept: application/json", "||", "exit", "1" ]
interval: 15s
timeout: 10s
retries: 3
start_period: 10s
start_interval: 15s