51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
services:
|
|
starter-api:
|
|
# REMPLACE par ton URL Gitea réelle
|
|
image: gitea.leonmorival.com/leon-morival/laravel-starter:latest
|
|
restart: unless-stopped
|
|
depends_on:
|
|
pgsql:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8002:80"
|
|
environment:
|
|
APP_ENV: "production" # Changé de local à production
|
|
APP_KEY: "${APP_KEY}"
|
|
APP_URL: "${APP_URL}"
|
|
APP_DEBUG: "false" # Sécurité : false en prod
|
|
FILESYSTEM_DISK: "public"
|
|
DB_CONNECTION: "pgsql"
|
|
DB_HOST: "pgsql"
|
|
DB_PORT: 5432
|
|
DB_DATABASE: "${DB_DATABASE}"
|
|
DB_USERNAME: "${DB_USERNAME}"
|
|
DB_PASSWORD: "${DB_PASSWORD}"
|
|
volumes:
|
|
- storage-data:/var/www/html/storage/app
|
|
- storage-public-data:/var/www/html/storage/app/public
|
|
|
|
pgsql:
|
|
image: postgres:15-alpine # Attention: postgres 18 n'existe pas encore (17 max), 15 est stable
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: "${DB_DATABASE}"
|
|
POSTGRES_USER: "${DB_USERNAME}"
|
|
POSTGRES_PASSWORD: "${DB_PASSWORD}"
|
|
volumes:
|
|
- pgsql-data:/var/lib/postgresql/data # Ajout de /data pour la persistance correcte
|
|
ports:
|
|
- "5428:5432"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_DATABASE}" ]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
volumes:
|
|
pgsql-data:
|
|
external: true
|
|
name: starter_pgsql_data
|
|
storage-data:
|
|
storage-public-data:
|
|
name: starter_storage_public_data
|