-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.develop.yaml
153 lines (142 loc) · 3.43 KB
/
compose.develop.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Language: Compose YAML, Project: DatAasee, License: MIT, Author: Christian Himpe
name: "dataasee"
networks:
"internal":
secrets:
"database":
file: "secrets/db_pass"
"datalake":
file: "secrets/dl_pass"
volumes:
"backup":
driver: "local"
driver_opts:
type: "none"
o: "bind"
device: "${DL_BACKUP-./backup}"
services:
## Database ####################################################################
"database":
build:
args:
BUILDKIT_INLINE_CACHE: 1
IMGREPO: ${ORIGIN:-}
VERSION: $DB_VERSION
DB_NAME: $DB_NAME
cache_from:
- "$REGISTRY/$DL_REPO/database:$DL_VERSION"
context: "."
dockerfile: "container/Dockerfile.db"
tags:
- "$REGISTRY/$DL_REPO/database:$DL_VERSION"
target: "develop"
deploy:
replicas: 1
resources:
limits:
cpus: "2.0"
memory: "4G"
reservations:
cpus: "2.0"
memory: "2G"
environment:
TZ: "CET"
DB_PASS: "/run/secrets/database"
image: "$REGISTRY/$DL_REPO/database:$DL_VERSION"
init: true
networks:
- "internal"
ports:
- "2480:2480"
- "9999:9999"
restart: "unless-stopped"
secrets:
- "database"
stop_grace_period: "180s"
volumes:
- "backup:/backup"
## Backend #####################################################################
"backend":
build:
args:
BUILDKIT_INLINE_CACHE: 1
IMGREPO: ${ORIGIN:-}
VERSION: $BE_VERSION
DL_NAME: $DL_NAME
DL_VERSION: $DL_VERSION
DL_PORT: "8343"
DL_PATH: $DL_PATH
DB_TYPE: "ArcadeDB"
DB_HOST: "database"
DB_PORT: "2480"
DB_NAME: $DB_NAME
cache_from:
- "$REGISTRY/$DL_REPO/backend:$DL_VERSION"
context: "."
dockerfile: "container/Dockerfile.be"
tags:
- "$REGISTRY/$DL_REPO/backend:$DL_VERSION"
target: "develop"
depends_on:
- "database"
deploy:
replicas: 1
resources:
limits:
cpus: "2.0"
memory: "2G"
reservations:
cpus: "1.0"
memory: "1G"
environment:
TZ: "CET"
DL_BASE: ${DL_BASE-}
DL_USER: ${DL_USER-admin}
DL_PASS: "/run/secrets/datalake"
DB_PASS: "/run/secrets/database"
image: "$REGISTRY/$DL_REPO/backend:$DL_VERSION"
init: true
networks:
- "internal"
ports:
- "${DL_PORT-8343}:8343"
restart: "unless-stopped"
secrets:
- "database"
- "datalake"
volumes:
- "./backend:/yaml:ro"
- "./api:/schemas:ro"
## Frontend ####################################################################
"frontend":
build:
args:
BUILDKIT_INLINE_CACHE: 1
IMGREPO: ${ORIGIN:-}
VERSION: $FE_VERSION
DL_PATH: $DL_PATH
cache_from:
- "$REGISTRY/$DL_REPO/frontend:$DL_VERSION"
context: "."
dockerfile: "container/Dockerfile.fe"
tags:
- "$REGISTRY/$DL_REPO/frontend:$DL_VERSION"
target: "develop"
deploy:
replicas: 1
resources:
limits:
cpus: "2.0"
memory: "2G"
reservations:
cpus: "1.0"
memory: "1G"
image: "$REGISTRY/$DL_REPO/frontend:$DL_VERSION"
init: true
networks:
- "internal"
ports:
- "${FE_PORT-8000}:3000"
restart: "unless-stopped"
volumes:
- "./frontend:/yaml:ro"