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
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 3m57s
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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
22
production.json
Normal 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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user