Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 67 additions & 24 deletions blueprints/bigcapital/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- MAIL_HOST=${MAIL_HOST}
Expand Down Expand Up @@ -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
Comment thread
adryserage marked this conversation as resolved.
Comment thread
adryserage marked this conversation as resolved.
- GOTENBERG_DOCS_URL=${GOTENBERG_DOCS_URL}
# Exchange Rate
- EXCHANGE_RATE_SERVICE=${EXCHANGE_RATE_SERVICE}
Expand All @@ -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
Copy link

Copilot AI Feb 20, 2026

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 bigcapitalhq/server. Check DockerHub for available version tags and use a specific one (e.g., bigcapitalhq/server:1.2.3 or similar).

Copilot generated this review using guidance from repository custom instructions.
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"]
Comment thread
adryserage marked this conversation as resolved.
Comment on lines +91 to +104
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The database_migration service uses MONGODB_DATABASE_URL=mongodb://mongo/bigcapital (line 103) but doesn't declare a dependency on the mongo service. This could cause the migration to fail if mongo isn't ready when the migration runs. Consider adding mongo to the depends_on section with condition: service_started to ensure proper startup order.

Copilot uses AI. Check for mistakes.

mysql:
image: mariadb:10.11
restart: unless-stopped
Expand All @@ -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
Expand All @@ -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
Expand All @@ -133,9 +146,39 @@ services:
gotenberg:
image: gotenberg/gotenberg:7
restart: unless-stopped
ports:
- '9000'
expose:
- "3000"
Comment thread
adryserage marked this conversation as resolved.
Comment on lines +149 to +150
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port mismatch: Gotenberg is configured to expose port 3000 here, but template.toml line 36 configures gotenberg_url = "http://gotenberg:9000". This inconsistency will cause PDF generation to fail as the application will try to connect to the wrong port. Either change the exposed port here to "9000" to match template.toml, or update template.toml to use port 3000. Based on Gotenberg's documentation, the default API port is 3000, so template.toml should be updated to match this configuration.

Copilot uses AI. Check for mistakes.

minio:
image: minio/minio:latest
Copy link

Copilot AI Feb 20, 2026

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 MinIO version instead (e.g., minio/minio:RELEASE.2025-04-08T15-41-24Z as seen in other templates like colanode, or minio/minio:RELEASE.2025-09-07T16-13-09Z as in budibase). This ensures deployment stability and reproducibility.

Copilot generated this review using guidance from repository custom instructions.
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=${S3_ACCESS_KEY_ID}
- MINIO_ROOT_PASSWORD=${S3_SECRET_ACCESS_KEY}
Comment thread
adryserage marked this conversation as resolved.
volumes:
- minio:/data
expose:
- "9000"
- "9001"
healthcheck:
test: ["CMD", "mc", "ready", "local"]
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The healthcheck command "mc ready local" is not a valid MinIO health check. The correct healthcheck should use curl or wget to check the MinIO health endpoint. Based on other blueprints (e.g., budibase), the healthcheck should be: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]. Alternatively, you could use wget: test: ["CMD", "wget", "--spider", "-qO-", "http://localhost:9000/minio/health/live"].

Suggested change
test: ["CMD", "mc", "ready", "local"]
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]

Copilot uses AI. Check for mistakes.
interval: 10s
timeout: 5s
retries: 5

# Creates the S3 bucket on startup
minio-init:
image: minio/mc:latest
Copy link

Copilot AI Feb 20, 2026

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).

Copilot generated this review using guidance from repository custom instructions.
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set myminio http://minio:9000 ${S3_ACCESS_KEY_ID} ${S3_SECRET_ACCESS_KEY};
mc mb myminio/${S3_BUCKET} --ignore-existing;
exit 0;
"
Comment thread
adryserage marked this conversation as resolved.

volumes:
mysql:
Expand All @@ -147,6 +190,6 @@ volumes:
redis:
name: bigcapital_redis
driver: local



minio:
name: bigcapital_minio
driver: local
Loading