diff --git a/configs/docker.services.yml b/configs/docker.services.yml new file mode 100644 index 00000000..eada936a --- /dev/null +++ b/configs/docker.services.yml @@ -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 \ No newline at end of file diff --git a/configs/nginx.dynamicweb.conf b/configs/nginx.dynamicweb.conf new file mode 100644 index 00000000..42100381 --- /dev/null +++ b/configs/nginx.dynamicweb.conf @@ -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; + } +}