Files
crater/docker-compose.yml
LU-386 e03320d27b simplified deployment with docker (#639)
* updated Dockerfile and docker-compose.yml, replaced cron with ofelia and setup.sh with automatically executed startup.sh

* fixed permissions by setting them in setup-script
2022-03-16 18:29:21 +05:30

61 lines
1.3 KiB
YAML

version: '3'
services:
app:
build: .
image: craterapp/crater
restart: unless-stopped
volumes:
- ./:/var/www:z
labels:
ofelia.enabled: "true"
ofelia.job-exec.somecron.schedule: "@every 60s"
ofelia.job-exec.somecron.command: "php artisan schedule:run"
networks:
- crater
db:
image: mariadb
restart: unless-stopped
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
MYSQL_PASSWORD: crater
MYSQL_DATABASE: crater
MYSQL_ROOT_PASSWORD: crater
ports:
- '33006:3306'
networks:
- crater
nginx:
image: nginx:1.17-alpine
restart: unless-stopped
ports:
- 80:80
volumes:
- ./:/var/www:z
- ./docker-compose/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
networks:
- crater
ofelia:
image: mcuadros/ofelia
restart: unless-stopped
command: daemon --docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- app
volumes:
db:
networks:
crater:
driver: bridge