x-logging: &logging driver: "json-file" options: max-file: "5" max-size: "10m" services: postgres: logging: *logging image: postgres:15-alpine restart: "no" environment: POSTGRES_DB: pysite POSTGRES_PASSWORD: pysite POSTGRES_USER: pysite healthcheck: test: [ "CMD-SHELL", "pg_isready -U pysite" ] interval: 2s timeout: 1s retries: 5 ports: - 5432:5432 metricity: logging: *logging restart: "no" depends_on: postgres: condition: service_healthy build: context: . dockerfile: Dockerfile volumes: - ./logs:/metricity/logs - .:/metricity:ro env_file: - .env environment: DATABASE_URI: postgresql+asyncpg://pysite:pysite@postgres/metricity