Merge pull request #817 from benbrummer/octane

Compose file refactoring - Octane
This commit is contained in:
David Bomba
2025-10-01 18:12:08 +10:00
committed by GitHub

View File

@@ -1,16 +1,9 @@
# name: invoiceninja # name: invoiceninja
x-logging: &default-logging
options:
max-size: "10m"
max-file: "3"
driver: json-file
x-app-volumes: &volumes x-app-volumes: &volumes
volumes: volumes:
- ./.env:/app/.env - app_storage:/app/storage
- app_storage:/app/storage - caddy_data:/data
- caddy_data:/data
services: services:
app: app:
@@ -19,12 +12,12 @@ services:
image: invoiceninja/invoiceninja-octane:${TAG:-latest} image: invoiceninja/invoiceninja-octane:${TAG:-latest}
restart: unless-stopped restart: unless-stopped
# php artisan help octane:frankenphp # php artisan help octane:frankenphp
command: --port=80 --workers=2 --log-level=info command: --port=80 --workers=2
# command: --host=example.com --port=443 --workers=2 --https --http-redirect --log-level=info # command: --host=example.com --port=443 --workers=2 --https --http-redirect --log-level=info
ports: ports:
- "80:80" # HTTP - "80:80" # HTTP
# - "443:443" # HTTPS # - "443:443" # HTTPS
# - "443:443/udp" # HTTP/3, Works for chromium based browser, but causes H3_GENERAL_PROTOCOL_ERROR for pdf previews in Firefox # - "443:443/udp" # HTTP/3, Works for chromium based browser, but causes H3_GENERAL_PROTOCOL_ERROR for pdf previews in Firefox
env_file: env_file:
- ./.env - ./.env
environment: environment:
@@ -39,8 +32,7 @@ services:
# condition: service_healthy # condition: service_healthy
# valkey: # valkey:
# condition: service_healthy # condition: service_healthy
logging: *default-logging
app-worker: app-worker:
image: invoiceninja/invoiceninja-octane:${TAG:-latest} image: invoiceninja/invoiceninja-octane:${TAG:-latest}
restart: unless-stopped restart: unless-stopped
@@ -56,11 +48,9 @@ services:
<<: *volumes <<: *volumes
healthcheck: healthcheck:
test: ["CMD", "pgrep", "-f", "queue:work"] test: ["CMD", "pgrep", "-f", "queue:work"]
start_period: 10s
depends_on: depends_on:
app: app:
condition: service_healthy condition: service_healthy
logging: *default-logging
app-scheduler: app-scheduler:
image: invoiceninja/invoiceninja-octane:${TAG:-latest} image: invoiceninja/invoiceninja-octane:${TAG:-latest}
@@ -74,17 +64,13 @@ services:
<<: *volumes <<: *volumes
healthcheck: healthcheck:
test: ["CMD", "pgrep", "-f", "schedule:work"] test: ["CMD", "pgrep", "-f", "schedule:work"]
start_period: 10s
depends_on: depends_on:
app: app:
condition: service_healthy condition: service_healthy
logging: *default-logging
mysql: mysql:
image: mysql:8 image: mysql:8
restart: unless-stopped restart: unless-stopped
env_file:
- ./.env
environment: environment:
MYSQL_DATABASE: ${DB_DATABASE} MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME} MYSQL_USER: ${DB_USERNAME}
@@ -93,11 +79,16 @@ services:
volumes: volumes:
- mysql_data:/var/lib/mysql - mysql_data:/var/lib/mysql
healthcheck: healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost", "-u${MYSQL_USER}", "-p${MYSQL_PASSWORD}" ] test:
interval: 10s [
timeout: 5s "CMD",
retries: 5 "mysqladmin",
logging: *default-logging "ping",
"-h",
"localhost",
"-u${MYSQL_USER}",
"-p${MYSQL_PASSWORD}",
]
redis: redis:
image: redis:alpine image: redis:alpine
@@ -105,17 +96,11 @@ services:
volumes: volumes:
- redis_data:/data - redis_data:/data
healthcheck: healthcheck:
test: [ "CMD", "redis-cli", "ping" ] test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
logging: *default-logging
# mariadb: # mariadb:
# image: mariadb:11.4 # image: mariadb:11.8
# restart: unless-stopped # restart: unless-stopped
# env_file:
# - ./.env
# environment: # environment:
# MARIADB_DATABASE: ${DB_DATABASE} # MARIADB_DATABASE: ${DB_DATABASE}
# MARIADB_USER: ${DB_USERNAME} # MARIADB_USER: ${DB_USERNAME}
@@ -125,8 +110,6 @@ services:
# - mariadb:/var/lib/mysql # - mariadb:/var/lib/mysql
# healthcheck: # healthcheck:
# test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] # test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
# start_period: 60s
# logging: *default-logging
# valkey: # valkey:
# image: valkey/valkey:8 # image: valkey/valkey:8
@@ -135,8 +118,7 @@ services:
# - valkey:/data # - valkey:/data
# healthcheck: # healthcheck:
# test: [ "CMD", "valkey-cli", "ping" ] # test: [ "CMD", "valkey-cli", "ping" ]
# start_period: 10s
# logging: *default-logging
volumes: volumes:
app_storage: app_storage: