blob: 1a73096092621979565f1e7f58640b1aed32fdd9 (
plain) (
blame)
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
|
version: "3.4"
services:
server:
image: spring
build:
context: .
ports:
- "9080:8443"
networks:
- springnet
# cap_drop:
# - ALL
environment:
- DOCKER_DEPLOYMENT_TYPE=deployment
# restart: unless-stopped
depends_on:
- postgres
postgres:
image: postgres:14-alpine
networks:
- springnet
volumes:
- db-data:/var/lib/postgresql/14/
ports:
# - "127.0.0.1:5432:5432"
- "0.0.0.0:5432:5432"
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/pg_pass_secret
- POSTGRES_USER_FILE=/run/secrets/pg_user_secret
- POSTGRES_INITDB_ARGS_FILE=/run/secrets/pg_initdb_args_secret
- POSTGRES_DB_FILE=/run/secrets/pg_db_secret
secrets:
- pg_pass_secret
- pg_user_secret
- pg_initdb_args_secret
- pg_db_secret
# restart: unless-stopped
networks:
springnet:
volumes:
db-data:
secrets:
pg_pass_secret:
file: ./postgres/pg_pass_secret
pg_user_secret:
file: ./postgres/pg_user_secret
pg_initdb_args_secret:
file: ./postgres/pg_initdb_args_secret
pg_db_secret:
file: ./postgres/pg_db_secret
|