fix: add production configuration file and update docker-compose to remove unnecessary environment variables
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m57s

This commit is contained in:
2025-09-11 11:26:57 -05:00
parent 7bf32c35c4
commit 4c5b78a584
3 changed files with 25 additions and 7 deletions

View File

@@ -101,6 +101,9 @@ WORKDIR /app
# Copy application files from builder stage
COPY --from=builder --chown=pa11y:pa11y /app /app
# Copy production configuration
COPY --chown=pa11y:pa11y production.json /app/config/production.json
# Switch to non-root user
USER pa11y

View File

@@ -26,14 +26,7 @@ services:
- ${PA11Y_PORT:-4000}:4000
environment:
NODE_ENV: ${NODE_ENV:-production}
PORT: 4000
NOINDEX: ${NOINDEX:-true}
READONLY: ${READONLY:-false}
SITE_MESSAGE: ${SITE_MESSAGE:-}
WEBSERVICE_DATABASE: mongodb://mongodb:27017/pa11y-webservice
WEBSERVICE_HOST: 0.0.0.0
WEBSERVICE_PORT: 3000
WEBSERVICE_CRON: ${WEBSERVICE_CRON:-0 2 * * *}
networks:
- pa11y-network

22
production.json Normal file
View File

@@ -0,0 +1,22 @@
{
"port": 4000,
"noindex": true,
"readonly": false,
"webservice": {
"database": "mongodb://mongodb/pa11y-webservice",
"host": "0.0.0.0",
"port": 3000,
"cron": "0 2 * * *",
"chromeLaunchConfig": {
"args": [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-dev-shm-usage",
"--disable-accelerated-2d-canvas",
"--disable-gpu",
"--window-size=1280,1024"
]
}
}
}