gawa/docker-compose.yml

75 lines
1.5 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
- ./docker/db/scripts:/docker-entrypoint-initdb.d/
main:
build: ./docker/main
command: bash -c "
python manage.py migrate
&& python manage.py collectstatic --noinput
&& python manage.py runserver 0.0.0.0:8000
"
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
- caddy_data:/data
- caddy_config:/config
- ./gawa/static:/srv/static
- ./gawa/media:/srv/media
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
depends_on:
- db
db-admin:
image: phpmyadmin
ports:
- 8080:80
environment:
- PMA_HOST=db
- PMA_ABSOLUTE_URI=http://localhost:8080
depends_on:
- db
volumes:
caddy_data:
caddy_config:
db_data: