2023-05-29 02:21:31 +02:00
|
|
|
services:
|
|
|
|
db:
|
|
|
|
image: mariadb
|
2023-06-06 00:24:53 +02:00
|
|
|
container_name: gawa-db
|
2023-05-29 02:21:31 +02:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
ports:
|
|
|
|
- 3306:3306
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: gawa
|
|
|
|
MYSQL_USER: gawa
|
|
|
|
MYSQL_PASSWORD: changethisforprod
|
|
|
|
MYSQL_ROOT_PASSWORD: root
|
|
|
|
volumes:
|
|
|
|
- ./db/data:/var/lib/mysql
|
2023-06-06 00:24:53 +02:00
|
|
|
|
|
|
|
gawa:
|
2023-05-29 02:21:31 +02:00
|
|
|
build: ./web
|
2023-06-06 00:24:53 +02:00
|
|
|
container_name: gawa
|
2023-05-29 02:21:31 +02:00
|
|
|
command: python manage.py runserver 0.0.0.0:80
|
|
|
|
volumes:
|
|
|
|
- ./gawa:/app
|
|
|
|
ports:
|
2023-06-06 00:24:53 +02:00
|
|
|
- 8080:80
|
2023-05-29 02:21:31 +02:00
|
|
|
environment:
|
|
|
|
- MARIADB_NAME=gawa
|
|
|
|
- MARIADB_USER=gawa
|
|
|
|
- MARIADB_PASSWORD=changethisforprod
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
depends_on:
|
|
|
|
- db
|
2023-06-06 00:24:53 +02:00
|
|
|
|
|
|
|
nginx:
|
|
|
|
# only for developement. Use dedicated static container in prod
|
|
|
|
image: nginx
|
|
|
|
container_name: gawa-web
|
|
|
|
volumes:
|
|
|
|
- ./web/templates:/etc/nginx/templates
|
|
|
|
- ./gawa/static:/var/www/static
|
|
|
|
- ./gawa/media:/var/www/media
|
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
environment:
|
|
|
|
- NGINX_HOST=0.0.0.0
|
|
|
|
- NGINX_PORT=80
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
depends_on:
|
|
|
|
- gawa
|
|
|
|
|
2023-05-29 02:21:31 +02:00
|
|
|
phpmyadmin:
|
|
|
|
image: phpmyadmin
|
2023-06-06 00:24:53 +02:00
|
|
|
container_name: gawa-db-admin
|
2023-05-29 02:21:31 +02:00
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
ports:
|
|
|
|
- "127.0.0.1:8082:80"
|
|
|
|
environment:
|
|
|
|
- PMA_HOST=db
|
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
internal:
|
|
|
|
driver: bridge
|
|
|
|
|