forked from ethibox/awesome-stacks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrater.yml
58 lines (53 loc) · 1.73 KB
/
crater.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
# DOMAIN=example.com docker stack deploy -c crater.yml crater
# docker exec -u crater -it crater_crater git clone https://github.com/bytefury/crater .
# docker exec -u crater -it composer install -d html
# docker service update --force crater_app chmod -R 777 html/storage/
# docker service update --force crater_app chmod -R 777 html/bootstrap/cache/
services:
nginx:
image: ethibox/nginx-proxy:latest
environment:
- SERVER_NAME={{ index .Service.Labels "com.docker.stack.namespace" }}_app
- NGINX_ROOT_PATH=/var/www/html/public
volumes:
- ${VOLUME_PATH}data:/var/www/html:cached
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.crater-${NUMBER:-1}.rule=Host(`${DOMAIN:-crater.localhost}`)
- traefik.http.routers.crater-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.crater-${NUMBER:-1}.service=crater-${NUMBER:-1}
- traefik.http.routers.crater-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.crater-${NUMBER:-1}.loadbalancer.server.port=80
networks:
- internal
- traefik
app:
image: ethibox/crater:${VERSION:-4.2.0}
environment:
- APP_KEY=${APP_KEY:-S0meR@nd0mStringS0meR@nd0mString}
volumes:
- ${VOLUME_PATH}data:/var/www/html:cached
networks:
- internal
mariadb:
image: mariadb:10.5.9
volumes:
- ${VOLUME_PATH}mariadb:/var/lib/mysql:cached
environment:
- MYSQL_ROOT_PASSWORD=myp@ssw0rd
- MYSQL_DATABASE=crater
- MYSQL_USER=crater
- MYSQL_PASSWORD=myp@ssw0rd
networks:
- internal
volumes:
data:
mariadb:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net