-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
57 lines (53 loc) · 1.48 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
version: "3.8"
services:
database:
container_name: unifi-voucher-database
image: mysql
environment:
MYSQL_DATABASE: DATABASE
MYSQL_ROOT_PASSWORD: ROOT_PASSWORD
volumes:
- db-data:/var/lib/mysql
frontend:
container_name: unifi-voucher-frontend
image: unifi-voucher-frontend
# enviroment variables dont actually do anything, u have to define them in .env or via the Build Arguments
build:
context: ./frontend
target: production
args:
REACT_APP_BACKEND_PORT: 3000
REACT_APP_BACKEND_URL: http://localhost
REACT_APP_SYSTEM_NAME: UniFi Voucher System
REACT_APP_GENERAL_ERROR_MESSAGE: Sorry, es gab nen Fehler, versuch das doch einfach nachher nochmal
REACT_APP_NOT_FOUND_ERROR_MESSAGE: Sorry, wir haben leider nix gefunden
ports:
- 80:80
volumes:
- app-data:/app
backend:
container_name: unifi-voucher-backend
image: unifi-voucher-backend
restart: always
environment:
ACCESS_TOKEN_SECRET: LONG_RANDOM_CHARS
REFRESH_TOKEN_SECRET: LONG_RANDOM_CHARS
DB_HOST: database
DB_USER: root
DB_PASSWORD: ROOT_PASSWORD
DB_DATABASE: DATABASE
UNIFI_HOST: UNIFI_URL
UNIFI_PORT: UNIFI_PORT
UNIFI_USER: UNIFI_USER
UNIFI_PASS: UNIFI_USER_PASSWORD
depends_on:
- database
build:
context: ./backend
ports:
- 3000:3000
volumes:
- app-data:/app
volumes:
db-data:
app-data: