2024-11-15 11:24:21 +00:00
|
|
|
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:
|
2024-11-21 10:30:05 +00:00
|
|
|
POSTGRES_USER: ${SERVICE_USER_POSTGRES}
|
|
|
|
POSTGRES_PASSWORD: ${SERVICE_PASSWORD_POSTGRES}
|
2024-11-15 11:24:21 +00:00
|
|
|
POSTGRES_DB: baleen
|
2024-11-15 11:42:28 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready", "-d", "baleen"]
|
|
|
|
start_period: 20s
|
|
|
|
retries: 5
|
|
|
|
interval: 10s
|
2024-11-15 11:24:21 +00:00
|
|
|
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:
|
2024-11-21 10:30:05 +00:00
|
|
|
DB_CONNECTION: postgres://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/baleen
|
2024-11-15 11:42:28 +00:00
|
|
|
entrypoint: sh -c "php bin/doctrine orm:schema-tool:update --complete --force && php-fpm"
|
|
|
|
depends_on:
|
|
|
|
postgres:
|
|
|
|
condition: service_healthy
|
|
|
|
links:
|
|
|
|
- postgres
|