services: db: image: mariadb container_name: gawa-db 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 gawa: build: ./web container_name: gawa command: python manage.py runserver 0.0.0.0:80 volumes: - ./gawa:/app ports: - 8080:80 environment: - MARIADB_NAME=gawa - MARIADB_USER=gawa - MARIADB_PASSWORD=changethisforprod networks: - internal depends_on: - db 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 phpmyadmin: image: phpmyadmin container_name: gawa-db-admin networks: - internal ports: - "127.0.0.1:8082:80" environment: - PMA_HOST=db networks: internal: driver: bridge