mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-03-21 20:18:40 -06:00
Merge pull request #2422 from enginer/fix/docker-compose-startup
fix(docker): fix docker-compose startup failures for fresh installs
This commit is contained in:
+7
-1
@@ -52,7 +52,13 @@ DEL_INSTANCE=false
|
|||||||
|
|
||||||
# Provider: postgresql | mysql | psql_bouncer
|
# Provider: postgresql | mysql | psql_bouncer
|
||||||
DATABASE_PROVIDER=postgresql
|
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
|
# Client name for the database connection
|
||||||
# It is used to separate an API installation from another that uses the same database.
|
# It is used to separate an API installation from another that uses the same database.
|
||||||
DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange
|
DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange
|
||||||
|
|||||||
+2
-7
@@ -14,7 +14,6 @@ services:
|
|||||||
- evolution_instances:/evolution/instances
|
- evolution_instances:/evolution/instances
|
||||||
networks:
|
networks:
|
||||||
- evolution-net
|
- evolution-net
|
||||||
- dokploy-network
|
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
expose:
|
expose:
|
||||||
@@ -26,6 +25,8 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "3000:80"
|
- "3000:80"
|
||||||
|
volumes:
|
||||||
|
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
|
||||||
networks:
|
networks:
|
||||||
- evolution-net
|
- evolution-net
|
||||||
|
|
||||||
@@ -41,9 +42,6 @@ services:
|
|||||||
evolution-net:
|
evolution-net:
|
||||||
aliases:
|
aliases:
|
||||||
- evolution-redis
|
- evolution-redis
|
||||||
dokploy-network:
|
|
||||||
aliases:
|
|
||||||
- evolution-redis
|
|
||||||
expose:
|
expose:
|
||||||
- "6379"
|
- "6379"
|
||||||
|
|
||||||
@@ -67,7 +65,6 @@ services:
|
|||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
networks:
|
networks:
|
||||||
- evolution-net
|
- evolution-net
|
||||||
- dokploy-network
|
|
||||||
expose:
|
expose:
|
||||||
- "5432"
|
- "5432"
|
||||||
|
|
||||||
@@ -80,5 +77,3 @@ networks:
|
|||||||
evolution-net:
|
evolution-net:
|
||||||
name: evolution-net
|
name: evolution-net
|
||||||
driver: bridge
|
driver: bridge
|
||||||
dokploy-network:
|
|
||||||
external: true
|
|
||||||
+51
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user