-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
68 lines (63 loc) · 1.22 KB
/
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
services:
database:
container_name: database
image: postgres
restart: always
user: postgres
secrets:
- db-password
volumes:
- db-data:/var/lib/postgresql/data
networks:
- golang-postgres
environment:
- POSTGRES_DB=peminjaman-ruangan
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
expose:
- 5432
ports:
- 5432:5432
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
frontend:
container_name: frontend
image: frontend
build: ./frontend
restart: always
volumes:
- type: bind
source: ./frontend/nginx.conf
target: /etc/nginx/conf.d/default.conf
read_only: true
networks:
- golang-postgres
ports:
- 3181:80
backend:
container_name: backend
restart: always
build:
context: backend
target: builder
volumes:
- ./backend:/usr/src/app
secrets:
- app.env
networks:
- golang-postgres
ports:
- 1118:1118
expose:
- 1118
networks:
golang-postgres:
volumes:
db-data:
secrets:
app.env:
file: backend/app.env
db-password:
file: database/password.txt