Merge pull request #2422 from enginer/fix/docker-compose-startup
Security Scan / Dependency Review (push) Has been skipped
Check Code Quality / check-lint-and-build (push) Failing after 1m20s
Build Docker image / Build and Deploy (push) Failing after 1m32s
Security Scan / CodeQL Analysis (javascript) (push) Failing after 1m31s

fix(docker): fix docker-compose startup failures for fresh installs
This commit is contained in:
Davidson Gomes
2026-02-24 12:23:21 -03:00
committed by GitHub
3 changed files with 61 additions and 9 deletions
+7 -1
View File
@@ -52,7 +52,13 @@ DEL_INSTANCE=false
# Provider: postgresql | mysql | psql_bouncer
DATABASE_PROVIDER=postgresql
DATABASE_CONNECTION_URI='postgresql://user:pass@postgres:5432/evolution_db?schema=evolution_api'
DATABASE_CONNECTION_URI='postgresql://user:pass@evolution-postgres:5432/evolution_db?schema=evolution_api'
# Postgres container settings (used by docker-compose)
POSTGRES_DATABASE=evolution_db
POSTGRES_USERNAME=user
POSTGRES_PASSWORD=pass
# Client name for the database connection
# It is used to separate an API installation from another that uses the same database.
DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange
+2 -7
View File
@@ -14,7 +14,6 @@ services:
- evolution_instances:/evolution/instances
networks:
- evolution-net
- dokploy-network
env_file:
- .env
expose:
@@ -26,6 +25,8 @@ services:
restart: always
ports:
- "3000:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
networks:
- evolution-net
@@ -41,9 +42,6 @@ services:
evolution-net:
aliases:
- evolution-redis
dokploy-network:
aliases:
- evolution-redis
expose:
- "6379"
@@ -67,7 +65,6 @@ services:
- postgres_data:/var/lib/postgresql/data
networks:
- evolution-net
- dokploy-network
expose:
- "5432"
@@ -80,5 +77,3 @@ networks:
evolution-net:
name: evolution-net
driver: bridge
dokploy-network:
external: true
+51
View File
@@ -0,0 +1,51 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/javascript
application/xml+rss
application/json;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
# Handle client routing
location / {
try_files $uri $uri/ /index.html;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Cache HTML files for a shorter period
location ~* \.html$ {
expires 1h;
add_header Cache-Control "public";
}
# Health check endpoint
location /health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}
}