-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: containers config and nginx config
- Loading branch information
Showing
3 changed files
with
85 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: "1.0" | ||
|
||
services: | ||
postgres: | ||
container_name: postgresDb | ||
image: postgres:9.6 | ||
ports: | ||
- "5433:5432" | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: "1.0" | ||
|
||
services: | ||
postgres: | ||
container_name: np-postgresDb | ||
image: postgres:9.6 | ||
ports: | ||
- "5434:5432" | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,79 @@ | ||
limit_req_zone $binary_remote_addr zone=one:10m rate=90r/m; | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
|
||
root /var/www/html; | ||
|
||
index index.html index.htm index.nginx-debian.html; | ||
|
||
server_name _; | ||
|
||
location / { | ||
# First attempt to serve request as file, then | ||
# as directory, then fall back to displaying a 404. | ||
# try_files $uri $uri/ =404; | ||
proxy_pass http://localhost:5000; # your app's port | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
limit_req zone=one; | ||
} | ||
server { | ||
listen 80 default_server; | ||
listen [::]:80 default_server; | ||
|
||
root /var/www/html; | ||
|
||
index index.html index.htm index.nginx-debian.html; | ||
|
||
server_name _; | ||
|
||
location / { | ||
proxy_pass http://localhost:5000; # your app's port | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
} | ||
|
||
location /threads { | ||
limit_req zone=one; | ||
proxy_pass http://localhost:5000; # your app's port | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
} | ||
} | ||
|
||
server { | ||
|
||
root /var/www/html; | ||
|
||
index index.html index.htm index.nginx-debian.html; | ||
server_name www.social-news-wear-slowly.a276.dcdg.xyz social-news-wear-slowly.a276.dcdg.xyz; # managed by Certbot | ||
|
||
|
||
location / { | ||
# First attempt to serve request as file, then | ||
# as directory, then fall back to displaying a 404. | ||
# try_files $uri $uri/ =404; | ||
proxy_pass http://localhost:5000; # your app's port | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
limit_req zone=one; | ||
} | ||
|
||
|
||
listen [::]:443 ssl ipv6only=on; # managed by Certbot | ||
listen 443 ssl; # managed by Certbot | ||
ssl_certificate /etc/letsencrypt/live/social-news-wear-slowly.a276.dcdg.xyz/fullchain.pem; # managed by Certbot | ||
ssl_certificate_key /etc/letsencrypt/live/social-news-wear-slowly.a276.dcdg.xyz/privkey.pem; # managed by Certbot | ||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | ||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | ||
root /var/www/html; | ||
|
||
index index.html index.htm index.nginx-debian.html; | ||
server_name www.social-news-wear-slowly.a276.dcdg.xyz social-news-wear-slowly.a276.dcdg.xyz; # managed by Certbot | ||
|
||
location / { | ||
proxy_pass http://localhost:5000; # your app's port | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
} | ||
|
||
location /threads { | ||
limit_req zone=one; | ||
proxy_pass http://localhost:5000; # your app's port | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_set_header Host $host; | ||
proxy_cache_bypass $http_upgrade; | ||
} | ||
|
||
listen [::]:443 ssl ipv6only=on; # managed by Certbot | ||
listen 443 ssl; # managed by Certbot | ||
ssl_certificate /etc/letsencrypt/live/social-news-wear-slowly.a276.dcdg.xyz/fullchain.pem; # managed by Certbot | ||
ssl_certificate_key /etc/letsencrypt/live/social-news-wear-slowly.a276.dcdg.xyz/privkey.pem; # managed by Certbot | ||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | ||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | ||
} | ||
|
||
server { | ||
if ($host = www.social-news-wear-slowly.a276.dcdg.xyz) { | ||
return 301 https://$host$request_uri; | ||
} # managed by Certbot | ||
|
||
|
||
if ($host = social-news-wear-slowly.a276.dcdg.xyz) { | ||
return 301 https://$host$request_uri; | ||
} # managed by Certbot | ||
|
||
|
||
listen 80 ; | ||
listen [::]:80 ; | ||
listen 80 ; | ||
listen [::]:80 ; | ||
server_name www.social-news-wear-slowly.a276.dcdg.xyz social-news-wear-slowly.a276.dcdg.xyz; | ||
return 404; # managed by Certbot | ||
} | ||
} |