-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (80 loc) · 2.39 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
name: simple-file-storage
services:
# https://hub.docker.com/_/mariadb
mariadb:
image: mariadb:latest
restart: always
volumes:
- ./docker/database:/var/lib/mysql
command: [ "--collation-server=utf8mb4_unicode_ci" ]
environment:
TZ: ${TZ}
MARIADB_DATABASE: ${DATABASE_NAME}
MARIADB_PORT: ${DATABASE_PORT}
MARIADB_USER: ${DATABASE_USERNAME}
MARIADB_PASSWORD: ${DATABASE_PASSWORD}
MARIADB_INITDB_SKIP_TZINFO: true
MARIADB_RANDOM_ROOT_PASSWORD: 1
healthcheck:
test: healthcheck.sh --su-mysql --connect --innodb_initialized
retries: 3
timeout: 5s
ports:
- "3306:${DATABASE_PORT}"
# https://hub.docker.com/_/phpmyadmin
phpmyadmin:
image: phpmyadmin:latest
restart: always
depends_on:
- mariadb
environment:
PMA_HOST: ${DATABASE_HOST}
PMA_PORT: ${DATABASE_PORT}
PMA_USER: ${DATABASE_USERNAME}
PMA_PASSWORD: ${DATABASE_PASSWORD}
healthcheck:
test: curl -f http://localhost
retries: 3
timeout: 5s
ports:
- "8080:80"
# https://hub.docker.com/_/varnish
varnish:
image: varnish:alpine
depends_on:
- node
volumes:
- ./docker/default.vcl:/etc/varnish/default.vcl:ro
environment:
VARNISH_SIZE: 128m
healthcheck:
test: wget -O - http://localhost/
retries: 3
timeout: 5s
ports:
- "8080:80"
# https://github.com/FlorianLeChat/Simple-File-Storage
node:
image: simple-file-storage
restart: always
develop:
watch:
- action: sync
path: .
target: /usr/src/app
volumes:
- ./public/files:/usr/src/app/public/files
- ./public/avatars:/usr/src/app/public/avatars
depends_on:
- mariadb
environment:
- WAIT_HOSTS=mariadb:${DATABASE_PORT}
healthcheck:
test: wget -O - http://localhost:3000
retries: 3
timeout: 5s
build:
context: .
dockerfile: ./docker/Dockerfile.${NEXT_PUBLIC_ENV}
ports:
- "3000:3000"