gawa/docker-compose.yml

67 lines
1.3 KiB
YAML

services:
db:
image: mariadb
ports:
- 3306:3306
environment:
MYSQL_DATABASE: gawa
MYSQL_USER: gawa
MYSQL_PASSWORD: changethisforprod
MYSQL_ROOT_PASSWORD: root
volumes:
- ./db/data:/var/lib/mysql
main:
build: ./docker/main
command: python manage.py runserver 0.0.0.0:80
volumes:
- ./gawa:/app
environment:
- MARIADB_NAME=gawa
- MARIADB_USER=gawa
- MARIADB_PASSWORD=changethisforprod
depends_on:
- db
caddy:
image: caddy
restart: unless-stopped
ports:
- "80:80"
- "8081:8081"
# - "443:443"
# - "443:443/udp"
volumes:
- $PWD/docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
- ./gawa/static:/srv/static
- ./gawa/media:/srv/media
- ./site:/srv
blog:
image: ghost
environment:
database__client: mysql
database__connection__host: db
database__connection__user: blog
database__connection__password: blogpass
database__connection__database: blog
url: http://localhost:8081
NODE_ENV: development
db-admin:
image: phpmyadmin
ports:
- 8080:80
environment:
- PMA_HOST=db
- PMA_ABSOLUTE_URI=http://localhost:8080
volumes:
caddy_data:
caddy_config: