-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (75 loc) · 2.14 KB
/
docker-compose.yml
File metadata and controls
81 lines (75 loc) · 2.14 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:
db:
container_name: java-swing-tutor-db
image: postgres:17
environment:
POSTGRES_DB: java_swing_tutor
POSTGRES_USER: java_swing_tutor
POSTGRES_PASSWORD: java_swing_tutor
ports:
- "5450:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U java_swing_tutor -d java_swing_tutor -h 127.0.0.1"]
interval: 5s
timeout: 5s
retries: 30
flyway:
container_name: java-swing-tutor-flyway
image: flyway/flyway:10
depends_on:
db:
condition: service_healthy
command: ["-connectRetries=60", "migrate"]
environment:
FLYWAY_URL: jdbc:postgresql://db:5432/java_swing_tutor
FLYWAY_USER: java_swing_tutor
FLYWAY_PASSWORD: java_swing_tutor
FLYWAY_LOCATIONS: filesystem:/flyway/sql
volumes:
- ./flyway/src/main/resources/db/migration:/flyway/sql:ro
service:
container_name: java-swing-tutor-service
build:
context: .
dockerfile: service/Dockerfile
depends_on:
flyway:
condition: service_completed_successfully
ports:
- "8400:8400"
environment:
JAVA_SWING_TUTOR_DATABASE_URL: jdbc:postgresql://db:5432/java_swing_tutor
JAVA_SWING_TUTOR_DATABASE_USER: java_swing_tutor
JAVA_SWING_TUTOR_DATABASE_PASSWORD: java_swing_tutor
JAVA_SWING_TUTOR_SERVICE_PORT: 8400
MICRONAUT_ENVIRONMENTS: docker
AUTH_SERVICE_BASE_URL: http://auth-service:8100
USER_SERVICE_BASE_URL: http://user-service:8095
LOG_LEVEL_ROOT: INFO
LOG_LEVEL_APP: INFO
LOG_LEVEL_MICRONAUT: INFO
networks:
- default
- observability-stack-network
website:
container_name: java-swing-tutor-website
build:
context: ./website
dockerfile: Dockerfile
ports:
- "3010:80"
environment:
- NODE_ENV=production
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- default
networks:
default:
name: java-swing-tutor-network
observability-stack-network:
external: true