2023-02-13 00:25:01 +01:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
application:
|
|
|
|
image: larueli/app
|
|
|
|
networks:
|
|
|
|
- traefik
|
|
|
|
environment:
|
|
|
|
APACHE_DOCUMENT_ROOT: /var/www/html/public
|
|
|
|
TZ: Europe/Paris
|
|
|
|
depends_on:
|
|
|
|
database:
|
|
|
|
condition: service_healthy
|
|
|
|
labels:
|
|
|
|
- "traefik.http.routers.app.rule=Host(`localhost`) && PathPrefix(`/api`)"
|
|
|
|
- "traefik.http.services.app.loadbalancer.server.port=8080"
|
|
|
|
- "traefik.http.routers.app.middlewares=app_strip"
|
|
|
|
- "traefik.http.middlewares.app.stripprefix.prefixes=/api"
|
|
|
|
- "traefik.http.middlewares.app.stripprefix.forceslash=false"
|
|
|
|
|
|
|
|
database:
|
|
|
|
image: postgres:15.1
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: app
|
|
|
|
POSTGRES_PASSWORD: app
|
|
|
|
POSTGRES_USER: app
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready"]
|
|
|
|
interval: 10s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
volumes:
|
2023-02-21 21:46:08 +01:00
|
|
|
- database-data:/var/lib/postgresql/data:rw
|
2023-02-13 00:25:01 +01:00
|
|
|
|
|
|
|
volumes:
|
2023-02-21 21:46:08 +01:00
|
|
|
database-data:
|