-
Notifications
You must be signed in to change notification settings - Fork 349
refactor(bigcapital): improve docker-compose reliability #717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: canary
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,23 +4,23 @@ services: | |||||
| restart: unless-stopped | ||||||
| depends_on: | ||||||
| - server | ||||||
| ports: | ||||||
| - '80' | ||||||
|
|
||||||
| expose: | ||||||
| - "80" | ||||||
|
|
||||||
| server: | ||||||
| image: bigcapitalhq/server:latest | ||||||
| restart: unless-stopped | ||||||
| depends_on: | ||||||
| mysql: | ||||||
| condition: service_healthy | ||||||
| database_migration: | ||||||
| condition: service_completed_successfully | ||||||
| mongo: | ||||||
| condition: service_started | ||||||
| redis: | ||||||
| condition: service_started | ||||||
| ports: | ||||||
| - '3000' | ||||||
|
|
||||||
| minio: | ||||||
| condition: service_healthy | ||||||
| expose: | ||||||
| - "3000" | ||||||
| environment: | ||||||
| - MAIL_HOST=${MAIL_HOST} | ||||||
|
|
@@ -55,7 +55,7 @@ services: | |||||
| # Sign-up email confirmation | ||||||
| - SIGNUP_EMAIL_CONFIRMATION=${SIGNUP_EMAIL_CONFIRMATION} | ||||||
| # Gotenberg (Pdf generator) | ||||||
| - GOTENBERG_URL=${GOTENBERG_URL} | ||||||
| - GOTENBERG_URL=http://gotenberg:3000 | ||||||
|
adryserage marked this conversation as resolved.
|
||||||
| - GOTENBERG_DOCS_URL=${GOTENBERG_DOCS_URL} | ||||||
| # Exchange Rate | ||||||
| - EXCHANGE_RATE_SERVICE=${EXCHANGE_RATE_SERVICE} | ||||||
|
|
@@ -80,13 +80,29 @@ services: | |||||
| - NEW_RELIC_SPAN_EVENTS_MAX_SAMPLES_STORED=${NEW_RELIC_SPAN_EVENTS_MAX_SAMPLES_STORED} | ||||||
| - NEW_RELIC_LICENSE_KEY=${NEW_RELIC_LICENSE_KEY} | ||||||
| - NEW_RELIC_APP_NAME=${NEW_RELIC_APP_NAME} | ||||||
| # S3 | ||||||
| # S3 (MinIO) | ||||||
| - S3_REGION=${S3_REGION} | ||||||
| - S3_ACCESS_KEY_ID=${S3_ACCESS_KEY_ID} | ||||||
| - S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY} | ||||||
| - S3_ENDPOINT=${S3_ENDPOINT} | ||||||
| - S3_BUCKET=${S3_BUCKET} | ||||||
|
|
||||||
| # Database migration - runs once then exits | ||||||
| database_migration: | ||||||
| image: bigcapitalhq/server:latest | ||||||
|
||||||
| depends_on: | ||||||
| mysql: | ||||||
| condition: service_healthy | ||||||
| environment: | ||||||
| - DB_HOST=mysql | ||||||
| - DB_USER=${DB_USER} | ||||||
| - DB_PASSWORD=${DB_PASSWORD} | ||||||
| - DB_CHARSET=${DB_CHARSET} | ||||||
| - SYSTEM_DB_NAME=${SYSTEM_DB_NAME} | ||||||
| - TENANT_DB_NAME_PERFIX=${TENANT_DB_NAME_PERFIX} | ||||||
| - MONGODB_DATABASE_URL=mongodb://mongo/bigcapital | ||||||
| command: ["node", "packages/server/build/commands.js", "system:migrate:latest"] | ||||||
|
adryserage marked this conversation as resolved.
Comment on lines
+91
to
+104
|
||||||
|
|
||||||
| mysql: | ||||||
| image: mariadb:10.11 | ||||||
| restart: unless-stopped | ||||||
|
|
@@ -97,9 +113,8 @@ services: | |||||
| - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} | ||||||
| volumes: | ||||||
| - mysql:/var/lib/mysql | ||||||
| ports: | ||||||
| - '3306' | ||||||
|
|
||||||
| expose: | ||||||
| - "3306" | ||||||
| healthcheck: | ||||||
| test: ["CMD-SHELL", "mysqladmin ping -h localhost -u root -p$$MYSQL_ROOT_PASSWORD || exit 1"] | ||||||
| interval: 10s | ||||||
|
|
@@ -110,20 +125,18 @@ services: | |||||
| mongo: | ||||||
| image: mongo:7 | ||||||
| restart: unless-stopped | ||||||
| ports: | ||||||
| - '27017' | ||||||
| expose: | ||||||
| - "27017" | ||||||
| volumes: | ||||||
| - mongo:/data/db | ||||||
|
|
||||||
|
|
||||||
| redis: | ||||||
| image: redis:7-alpine | ||||||
| restart: unless-stopped | ||||||
| ports: | ||||||
| - '6379' | ||||||
| expose: | ||||||
| - "6379" | ||||||
| volumes: | ||||||
| - redis:/data | ||||||
|
|
||||||
| healthcheck: | ||||||
| test: ["CMD", "redis-cli", "ping"] | ||||||
| interval: 10s | ||||||
|
|
@@ -133,9 +146,39 @@ services: | |||||
| gotenberg: | ||||||
| image: gotenberg/gotenberg:7 | ||||||
| restart: unless-stopped | ||||||
| ports: | ||||||
| - '9000' | ||||||
| expose: | ||||||
| - "3000" | ||||||
|
adryserage marked this conversation as resolved.
Comment on lines
+149
to
+150
|
||||||
|
|
||||||
| minio: | ||||||
| image: minio/minio:latest | ||||||
|
||||||
| restart: unless-stopped | ||||||
| command: server /data --console-address ":9001" | ||||||
| environment: | ||||||
| - MINIO_ROOT_USER=${S3_ACCESS_KEY_ID} | ||||||
| - MINIO_ROOT_PASSWORD=${S3_SECRET_ACCESS_KEY} | ||||||
|
adryserage marked this conversation as resolved.
|
||||||
| volumes: | ||||||
| - minio:/data | ||||||
| expose: | ||||||
| - "9000" | ||||||
| - "9001" | ||||||
| healthcheck: | ||||||
| test: ["CMD", "mc", "ready", "local"] | ||||||
|
||||||
| test: ["CMD", "mc", "ready", "local"] | |
| test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] |
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using :latest tag violates repository conventions. According to the Dokploy coding guidelines: "NEVER use latest tag—it can break templates when upstream images change unexpectedly." Pin to a specific version tag for minio/mc (e.g., check DockerHub for available release tags and use a specific one like minio/mc:RELEASE.2025-XX-XXT00-00-00Z).
Uh oh!
There was an error while loading. Please reload this page.