51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "8081:80"
|
|
volumes:
|
|
- ./frontend:/var/www/html
|
|
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
|
|
depends_on:
|
|
- php
|
|
networks:
|
|
- neptune
|
|
|
|
php:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.php
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: neptune_root_pass
|
|
volumes:
|
|
- ./backend:/var/www/backend
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
networks:
|
|
- neptune
|
|
restart: unless-stopped
|
|
|
|
mysql:
|
|
image: mysql:8.0
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: neptune_root_pass
|
|
MYSQL_DATABASE: neptune
|
|
MYSQL_USER: neptune
|
|
MYSQL_PASSWORD: neptune_pass
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
|
timeout: 10s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
networks:
|
|
- neptune
|
|
|
|
volumes:
|
|
mysql_data:
|
|
|
|
networks:
|
|
neptune: |