conf: added example conf for nginx proxy
Signed-off-by: rscnt <rascnt@gmail.com>
This commit is contained in:
parent
9be99ab8ee
commit
1d70f97347
2 changed files with 51 additions and 0 deletions
27
configs/docker.services.yml
Normal file
27
configs/docker.services.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
postgresql:
|
||||
image: postgres
|
||||
env_file: envs/psql.env
|
||||
hostname: db
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
nginx:
|
||||
image: nginx
|
||||
env_file: envs/nginx.env
|
||||
hostname: proxy
|
||||
volumes:
|
||||
- sites-enabled:/etc/nginx/conf.d
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
memcached:
|
||||
image: memcached
|
||||
env_file: envs/memcached.env
|
||||
hostname: cache
|
||||
|
||||
dynamicweb:
|
||||
build: .
|
||||
links:
|
||||
- memcached
|
||||
- db
|
||||
- proxy
|
24
configs/nginx.dynamicweb.conf
Normal file
24
configs/nginx.dynamicweb.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name destruction.io;
|
||||
|
||||
location /static/ {
|
||||
alias /home/r/dinamycweb/static/;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /home/r/dinamycweb/media/;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8080/;
|
||||
proxy_pass_header Server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_redirect off;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_connect_timeout 600;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue