-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (54 loc) · 1.19 KB
/
docker-compose.yml
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
version: "3"
services:
database:
image: postgres:11
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: secretpassword
expose:
- "5432"
networks:
- internal
volumes:
- ./database_data:/var/lib/postgresql/data
api:
build:
context: ./backend
environment:
SPRING_PROFILES_ACTIVE: "staging"
DB_URL: "database:5432"
DB_NAME: postgres
DB_USERNAME: postgres
DB_PASSWORD: secretpassword
TOKEN_SECRET_KEY: MjM0Njc4OTY3ODkyMzQ2Nzg5MjM0MjM0Njc4OTIzNDY3ODkyMzQyMzQyMzQyMzQyMzQyMzQyMzQyMzQyMzQ=
command: ["./wait-for-it.sh", "database:5432", "--", "sh", "-c", "java -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
expose:
- "8080"
networks:
- internal
volumes:
- ./forms:/tmp/forms
depends_on:
- database
frontend:
build:
context: ./frontend
expose:
- "80"
networks:
- internal
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
- 443:443
networks:
- internal
depends_on:
- api
- frontend
networks:
internal: