-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
97 lines (93 loc) · 2.05 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
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
services:
# postgres
db:
image: postgres:14.1-alpine
container_name: db
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=checkin-system
ports:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
networks:
- checkin-system-network
# backend
backend:
build:
context: ./backend
dockerfile: "Dockerfile"
x-bake:
platforms:
- linux/amd64
- linux/arm64
image: quay.io/d_rk/checkin-system-backend
container_name: backend
restart: unless-stopped
links:
- db
ports:
- "8080:8080"
environment:
- DB_HOST=db
- DB_DRIVER=postgres
- DB_USER=postgres
- DB_PASSWORD=postgres
- DB_NAME=checkin-system
- DB_PORT=5432
- DB_SSL_MODE=disable
- CORS_ALLOWED_ORIGINS=*
- CHECKIN_RETENTION_DAYS=365
- API_SECRET=${API_SECRET}
- TOKEN_EXPIRY_MINUTES=60
- ADMIN_PASSWORD=${API_ADMIN_PASSWORD}
networks:
- checkin-system-network
# frontend
frontend:
build:
context: ./frontend
dockerfile: "Dockerfile"
x-bake:
platforms:
- linux/amd64
- linux/arm64
image: quay.io/d_rk/checkin-system-frontend
container_name: frontend
restart: unless-stopped
links:
- backend
ports:
- "80:80"
networks:
- checkin-system-network
# rfid-reader
rfid-reader:
build:
context: ./raspi/rfid_reader
dockerfile: "Dockerfile"
x-bake:
platforms:
- linux/amd64
- linux/arm64
image: quay.io/d_rk/checkin-system-reader
container_name: rfid-reader
restart: unless-stopped
privileged: true
environment:
- API_BASEURL=http://backend:8080
- API_USER=admin
- API_PASSWORD=${API_ADMIN_PASSWORD}
links:
- backend
networks:
- checkin-system-network
# volume for db data
volumes:
db:
driver: local
networks:
checkin-system-network:
driver: bridge