-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose-dev.yml
More file actions
127 lines (122 loc) · 3.42 KB
/
Copy pathcompose-dev.yml
File metadata and controls
127 lines (122 loc) · 3.42 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
services:
postgres-db:
image: 'postgres:17.5-alpine'
container_name: postgres-db
environment:
- 'POSTGRES_DB=${DB_NAME}'
- 'POSTGRES_USER=${DB_USER}'
- 'POSTGRES_PASSWORD=${DB_PASSWORD}'
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
- ./src/main/resources/db/init-data.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} -h localhost -p 5432']
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
env_file:
- dev.env
app-native:
image: app/postgres-app-native:v0
build:
context: .
dockerfile: native.Dockerfile
environment:
DB_HOST: 'postgres-db'
DB_PORT: '5432'
DB_NAME: '${DB_NAME}'
DB_USER: '${DB_USER}'
DB_PASSWORD: '${DB_PASSWORD}'
command: |-
--spring.threads.virtual.enabled=true
--spring.docker.compose.enabled=false
--spring.profiles.active=postgres
ports:
- "8090:8090"
deploy:
mode: replicated
replicas: 1
depends_on:
postgres-db:
condition: service_healthy
env_file:
- dev.env
# volumes:
# - /tmp/app:/var/logs
app-jre:
image: app/postgres-app-jre:v1
build:
context: .
dockerfile: jre.Dockerfile
environment:
DB_HOST: 'postgres-db'
DB_PORT: '5432'
DB_NAME: '${DB_NAME}'
DB_USER: '${DB_USER}'
DB_PASSWORD: '${DB_PASSWORD}'
JAVA_TOOL_OPTIONS: '-Xmx300m -XX:+UseG1GC'
command: |-
--spring.threads.virtual.enabled=true
--spring.docker.compose.enabled=false
--spring.profiles.active=postgres
ports:
- "8090:8090"
deploy:
mode: replicated
replicas: 1
depends_on:
postgres-db:
condition: service_healthy
env_file:
- dev.env
# volumes:
# - /tmp/app:/var/logs
##To build this image: ./mvnw clean package jib:dockerBuild -DskipTests
app-jib:
image: app/postgres-app-jib:v1
environment:
DB_HOST: 'postgres-db'
DB_PORT: '5432'
DB_NAME: '${DB_NAME}'
DB_USER: '${DB_USER}'
DB_PASSWORD: '${DB_PASSWORD}'
# For images built via jib-maven-plugin, run below way to pass app args
command: >
--spring.threads.virtual.enabled=true --spring.docker.compose.enabled=false --spring.profiles.active=postgres
ports:
- "8090:8090"
deploy:
mode: replicated
replicas: 1
depends_on:
postgres-db:
condition: service_healthy
env_file:
- dev.env
##To build this image: ./mvnw clean package spring-boot:build-image-no-fork -DskipTests -Dspring-boot.build-image.env.BP_BASE_IMAGE="paketobuildpacks/builder-noble-java-tiny:latest" -Dspring-boot.build-image.env.BP_NATIVE_IMAGE_BUILD_ARGUMENTS="-H:Architecture=linux/amd64"
app-sb:
image: app/postgres-app-sb:v1
environment:
DB_HOST: 'postgres-db'
DB_PORT: '5432'
DB_NAME: '${DB_NAME}'
DB_USER: '${DB_USER}'
DB_PASSWORD: '${DB_PASSWORD}'
JAVA_TOOL_OPTIONS: '-Xmx300m'
command: >
--spring.threads.virtual.enabled=true --spring.docker.compose.enabled=false --spring.profiles.active=postgres
ports:
- "8090:8090"
deploy:
mode: replicated
replicas: 1
depends_on:
postgres-db:
condition: service_healthy
env_file:
- dev.env
volumes:
postgres_data: