-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
72 lines (66 loc) · 1.58 KB
/
docker-compose.yaml
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
version: '3.8'
services:
db:
hostname: db
image: postgres:14.4
restart: always
secrets:
- postgres_password
environment:
POSTGRES_USER: blocklist
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
shm_size: 1g
volumes:
- ./db/data:/var/lib/postgresql/data
- ./db/init-sql:/docker-entrypoint-initdb.d
- ./db/backups:/var/backups
ports:
- 8899:5432
command: >
-c max_wal_size=2GB
api:
restart: always
build:
context: ./
secrets:
- postgres_password
- auth_token
environment:
POSTGRES_USER: blocklist
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
AUTH_TOKEN_FILE: /run/secrets/auth_token
DNS_SERVERS: 192.168.4.113:5053
ports:
- 8484:8080
dev:
image: maven:3.8-openjdk-17-slim
volumes:
- "${PWD}/:/opt/blocklist-api"
- maven-repo:/root/.m2
working_dir: /opt/blocklist-api
environment:
POSTGRES_USER: blocklist
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
AUTH_TOKEN_FILE: /run/secrets/auth_token
DNS_SERVERS: 192.168.4.113:5053
secrets:
- postgres_password
- auth_token
command: ['mvn', 'spring-boot:run']
ports:
- 8484:8080
mvn:
image: maven:3.8-openjdk-17-slim
volumes:
- "${PWD}/:/opt/blocklist-api"
- "${HOME}/.m2:/root/.m2"
working_dir: /opt/blocklist-api
ports:
- 8484:8080
secrets:
postgres_password:
file: ./.secrets/db-password.txt
auth_token:
file: ./.secrets/auth-token.txt
volumes:
maven-repo: