-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
97 lines (93 loc) · 2.68 KB
/
compose.yml
File metadata and controls
97 lines (93 loc) · 2.68 KB
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
name: simple-file-storage
services:
database:
init: true
image: mariadb:12
restart: unless-stopped
command: --collation-server=utf8mb4_unicode_ci
volumes:
- mariadb_data:/var/lib/mysql
environment:
TZ: ${TZ}
MARIADB_DATABASE: ${DATABASE_NAME}
MARIADB_USER: ${DATABASE_USERNAME}
MARIADB_PASSWORD: ${DATABASE_PASSWORD}
MARIADB_AUTO_UPGRADE: true
MARIADB_INITDB_SKIP_TZINFO: true
MARIADB_RANDOM_ROOT_PASSWORD: true
security_opt:
- no-new-privileges=true
healthcheck:
test: healthcheck.sh --su-mysql --connect --innodb_initialized
retries: 3
timeout: 5s
start_period: 30s
deploy:
resources:
limits:
pids: 64
cpus: "0.5"
memory: 256M
proxy:
init: true
image: varnish:8-alpine
restart: unless-stopped
volumes:
- ./varnish.vcl:/etc/varnish/default.vcl:ro
cap_drop:
- ALL
depends_on:
server:
condition: service_healthy
environment:
VARNISH_SIZE: 128m
security_opt:
- no-new-privileges=true
healthcheck:
test: wget -O - http://localhost/
retries: 3
timeout: 5s
start_period: 30s
deploy:
resources:
limits:
pids: 1024
cpus: "0.5"
memory: 256M
ports:
- "${PORT:-80}:80"
server:
init: true
user: "${UID:-1000}:${GID:-1000}"
image: registry.florian-dev.fr:443/floriantrayon/simple-file-storage:${VERSION:-latest}
restart: unless-stopped
command: bash -c "npm run db:migrate || true; npm run start"
volumes:
- ./logs:/usr/src/app/logs
- ./files:/usr/src/app/public/files
cap_drop:
- ALL
environment:
PORT: 3000
depends_on:
database:
condition: service_healthy
security_opt:
- no-new-privileges=true
healthcheck:
test: wget -O - http://localhost:3000/
retries: 3
timeout: 5s
start_period: 30s
deploy:
resources:
limits:
pids: 64
cpus: "1"
memory: 512M
build:
target: production
context: .
dockerfile: ./docker/Dockerfile
volumes:
mariadb_data: