Skip to content

Commit

Permalink
Increase PostgreSQL max connections and adjust Nginx timeout settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kseen715 committed Dec 9, 2024
1 parent ed4126e commit 19581bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker-compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ services:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: "/var/lib/postgresql/data/pgdata"
POSTGRES_INITDB_ARGS: "--max-connections=1500"
POSTGRES_MAX_CONNECTIONS: "1500"
volumes:
- db-data:/docker-entrypoint-initdb.d
- db-data:/var/lib/postgresql/data
command: postgres -c max_connections=1500
ports:
- "${POSTGRES_PORT}:5432"
restart: always
Expand Down
6 changes: 6 additions & 0 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ server {
proxy_hide_header X-Runtime;
proxy_hide_header X-Version;
proxy_hide_header Content-Security-Policy;

proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;

# Add Content Security Policy headers
add_header Content-Security-Policy "
default-src 'self';
Expand Down

0 comments on commit 19581bf

Please sign in to comment.