-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
79 lines (74 loc) · 1.73 KB
/
compose.yaml
File metadata and controls
79 lines (74 loc) · 1.73 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
services:
postgres:
image: 'postgres:16-alpine'
container_name: postgres-db
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_NAME}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- '5432:5432'
volumes:
- ./postgres_data:/var/lib/postgresql
networks:
- hear-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER}" ]
interval: 5s
timeout: 5s
retries: 5
redis:
image: 'redis:7-alpine'
container_name: redis-cache
ports:
- '6379:6379'
networks:
- hear-network
app:
image: 'kusuri12/hear-spring-application:latest'
container_name: hear-app
ports:
- '8080:8080'
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/${POSTGRES_NAME}
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER}
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD}
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
networks:
- hear-network
restart: always
volumes:
- ./logs:/app/logs
nginx:
image: nginx:alpine
container_name: nginx-proxy
ports:
- "80:80"
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- app
networks:
- hear-network
restart: always
watchtower:
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DOCKER_API_VERSION=1.40
- WATCHTOWER_POLL_INTERVAL=60
command: --interval 30 --cleanup
restart: always
networks:
hear-network:
driver: bridge