This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
forked from crater-invoice-inc/crater
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
74 lines (70 loc) · 1.74 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
version: '3.3'
services:
app:
image: guanana2/crater:latest
working_dir: /var/www
depends_on:
db:
condition: service_healthy
healthcheck:
test: "bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/9000'"
interval: 10s
timeout: 10s
retries: 20
volumes:
- crater_data:/var/www/
- ./.env:/var/www/.env
db:
image: mariadb:10.9.6
volumes:
- db:/var/lib/mysql
# If you want to persist data on the host, comment the line above this one...
# and uncomment the line under this one.
#- ./docker-compose/db/data:/var/lib/mysql:rw,delegated
environment:
MYSQL_USER: crater_dev
MYSQL_PASSWORD: crater_dev
MYSQL_DATABASE: crater_dev
MYSQL_ROOT_PASSWORD: crater_dev_root
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
ports:
- '33006:3306'
nginx:
image: nginx:1.25.0-alpine-slim
volumes:
#- SSL:/etc/nginx/ssl/
- crater_data:/var/www
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf
ports:
- '443:443'
depends_on:
db:
condition: service_healthy
app:
condition: service_healthy
cron:
image: guanana2/crater-crond:latest
depends_on:
db:
condition: service_healthy
app:
condition: service_healthy
volumes:
- crater_data:/var/www
volumes:
db:
crater_data:
# NFS Example
# db:
# driver_opts:
# type: "nfs"
# o: "addr=nfserver,nolock,soft,rw,sec=sys,vers=4.2"
# device: ":/crater_dev/data/db"
# crater_data:
# driver_opts:
# type: "nfs"
# o: "addr=nfserver,nolock,soft,rw,sec=sys,vers=4.2"
# device: ":/crater_dev/data/www"