You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.5 KiB
74 lines
2.5 KiB
services: |
|
php: |
|
restart: unless-stopped |
|
build: |
|
context: . |
|
dockerfile: Dockerfile |
|
environment: |
|
APP_ENV: ${APP_ENV:-dev} |
|
SERVER_NAME: ${SERVER_NAME:-localhost}, php:80 |
|
MERCURE_PUBLISHER_JWT_KEY: ${MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} |
|
MERCURE_SUBSCRIBER_JWT_KEY: ${MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} |
|
# Run "composer require symfony/orm-pack" to install and configure Doctrine ORM |
|
DATABASE_URL: mysql://${MYSQL_USER:-app}:${MYSQL_PASSWORD:-!ChangeMe!}@database:3306/${MYSQL_DATABASE:-app}?serverVersion=${MYSQL_VERSION:-8.0}&charset=${MYSQL_CHARSET:-utf8mb4} |
|
# Run "composer require symfony/mercure-bundle" to install and configure the Mercure integration |
|
MERCURE_URL: ${MERCURE_URL:-http://php/.well-known/mercure} |
|
MERCURE_PUBLIC_URL: ${MERCURE_PUBLIC_URL:-https://${SERVER_NAME:-localhost}/.well-known/mercure} |
|
MERCURE_JWT_SECRET: ${MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} |
|
volumes: |
|
- caddy_data:/data |
|
- caddy_config:/config |
|
ports: |
|
# HTTP |
|
- target: 80 |
|
published: ${HTTP_PORT:-80} |
|
protocol: tcp |
|
# HTTPS |
|
- target: 443 |
|
published: ${HTTPS_PORT:-443} |
|
protocol: tcp |
|
# HTTP/3 |
|
- target: 443 |
|
published: ${HTTP3_PORT:-443} |
|
protocol: udp |
|
|
|
# Mercure is installed as a Caddy module, prevent the Flex recipe from installing another service |
|
###> symfony/mercure-bundle ### |
|
###< symfony/mercure-bundle ### |
|
|
|
###> doctrine/doctrine-bundle ### |
|
database: |
|
image: mysql:${MYSQL_VERSION:-8.0} |
|
environment: |
|
MYSQL_DATABASE: ${MYSQL_DATABASE:-app} |
|
MYSQL_USER: ${MYSQL_USER:-app} |
|
MYSQL_PASSWORD: ${MYSQL_PASSWORD:-!ChangeMe!} |
|
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-!ChangeRootPassword!} |
|
healthcheck: |
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] |
|
timeout: 5s |
|
retries: 5 |
|
start_period: 60s |
|
volumes: |
|
- database_data:/var/lib/mysql:rw |
|
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data! |
|
# - ./docker/db/data:/var/lib/mysql:rw |
|
###< doctrine/doctrine-bundle ### |
|
|
|
cron: |
|
build: |
|
context: ./docker/cron |
|
volumes: |
|
- .:/var/www/html |
|
depends_on: |
|
- php |
|
|
|
volumes: |
|
caddy_data: |
|
caddy_config: |
|
###> symfony/mercure-bundle ### |
|
###< symfony/mercure-bundle ### |
|
|
|
###> doctrine/doctrine-bundle ### |
|
database_data: |
|
###< doctrine/doctrine-bundle ###
|
|
|