2023-05-29 02:21:31 +02:00
|
|
|
services:
|
|
|
|
db:
|
|
|
|
image: mariadb
|
|
|
|
ports:
|
|
|
|
- 3306:3306
|
|
|
|
environment:
|
2023-09-26 22:44:29 +02:00
|
|
|
# MYSQL_DATABASE: gawa
|
|
|
|
# MYSQL_USER: gawa
|
|
|
|
# MYSQL_PASSWORD: changethisforprod
|
2023-05-29 02:21:31 +02:00
|
|
|
MYSQL_ROOT_PASSWORD: root
|
|
|
|
volumes:
|
2023-09-26 22:44:29 +02:00
|
|
|
- db_data:/var/lib/mysql
|
|
|
|
- ./docker/db/scripts:/docker-entrypoint-initdb.d/
|
2023-06-06 00:24:53 +02:00
|
|
|
|
2023-09-25 23:34:26 +02:00
|
|
|
main:
|
|
|
|
build: ./docker/main
|
2023-09-27 21:34:46 +02:00
|
|
|
command: bash -c "
|
|
|
|
python manage.py migrate
|
|
|
|
&& python manage.py collectstatic --noinput
|
2023-09-27 22:23:13 +02:00
|
|
|
&& python manage.py runserver 0.0.0.0:80
|
2023-09-27 21:34:46 +02:00
|
|
|
"
|
2023-05-29 02:21:31 +02:00
|
|
|
volumes:
|
|
|
|
- ./gawa:/app
|
|
|
|
environment:
|
|
|
|
- MARIADB_NAME=gawa
|
|
|
|
- MARIADB_USER=gawa
|
|
|
|
- MARIADB_PASSWORD=changethisforprod
|
|
|
|
depends_on:
|
|
|
|
- db
|
2023-06-06 00:24:53 +02:00
|
|
|
|
2023-09-25 23:34:26 +02:00
|
|
|
caddy:
|
|
|
|
image: caddy
|
|
|
|
restart: unless-stopped
|
2023-06-06 00:24:53 +02:00
|
|
|
ports:
|
2023-09-25 23:34:26 +02:00
|
|
|
- "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
|
|
|
|
|
|
|
|
|
2023-09-27 22:23:13 +02:00
|
|
|
# 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
|
2023-09-25 23:34:26 +02:00
|
|
|
|
2023-06-06 00:24:53 +02:00
|
|
|
|
2023-09-25 23:34:26 +02:00
|
|
|
db-admin:
|
2023-05-29 02:21:31 +02:00
|
|
|
image: phpmyadmin
|
|
|
|
ports:
|
2023-09-25 23:34:26 +02:00
|
|
|
- 8080:80
|
2023-05-29 02:21:31 +02:00
|
|
|
environment:
|
|
|
|
- PMA_HOST=db
|
2023-09-25 23:34:26 +02:00
|
|
|
- PMA_ABSOLUTE_URI=http://localhost:8080
|
2023-09-26 22:44:29 +02:00
|
|
|
depends_on:
|
|
|
|
- db
|
2023-05-29 02:21:31 +02:00
|
|
|
|
2023-09-25 23:34:26 +02:00
|
|
|
volumes:
|
|
|
|
caddy_data:
|
|
|
|
caddy_config:
|
2023-09-26 22:44:29 +02:00
|
|
|
db_data:
|