44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: baleen
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:1.27-alpine
|
|
ports:
|
|
- "8080:80"
|
|
volumes:
|
|
- ./:/var/www/html
|
|
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
depends_on:
|
|
- php
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
expose:
|
|
- 5432
|
|
environment:
|
|
POSTGRES_USER: ${SERVICE_USER_POSTGRES}
|
|
POSTGRES_PASSWORD: ${SERVICE_PASSWORD_POSTGRES}
|
|
POSTGRES_DB: baleen
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready", "-d", "baleen"]
|
|
start_period: 20s
|
|
retries: 5
|
|
interval: 10s
|
|
php:
|
|
build:
|
|
context: .
|
|
dockerfile: docker/php/Dockerfile
|
|
expose:
|
|
- 9000
|
|
volumes:
|
|
- ./src:/var/www/html/src
|
|
- ./public:/var/www/html/public
|
|
- ./views:/var/www/html/views
|
|
- ./bin:/var/www/html/bin
|
|
environment:
|
|
DB_CONNECTION: postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/baleen
|
|
entrypoint: sh -c "php bin/doctrine orm:schema-tool:update --complete --force && php-fpm"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
links:
|
|
- postgres |