4 changed files with 107 additions and 0 deletions
@ -0,0 +1,22 @@
|
||||
version: '3.8' |
||||
|
||||
services: |
||||
memcached: |
||||
image: memcached:1-alpine |
||||
entrypoint: memcached -m 128 # Limit to 128 MB Ram, customize at free will. |
||||
|
||||
app: |
||||
image: cupcakearmy/cryptgeon:latest |
||||
depends_on: |
||||
- memcached |
||||
|
||||
proxy: |
||||
image: nginx:alpine |
||||
depends_on: |
||||
- app |
||||
volumes: |
||||
- ./nginx-plain.conf:/etc/nginx/conf.d/default.conf |
||||
# Or with tls |
||||
# - ./nginx-tls.conf:/etc/nginx/conf.d/default.conf |
||||
ports: |
||||
- 80:80 |
@ -0,0 +1,13 @@
|
||||
server { |
||||
listen 80; |
||||
listen [::]:80; |
||||
server_name _; |
||||
|
||||
location / { |
||||
proxy_pass http://app:5000/; |
||||
proxy_set_header Host $host; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
proxy_set_header X-Forwarded-Proto $scheme; |
||||
} |
||||
} |
@ -0,0 +1,29 @@
|
||||
# You should change the server_name to something sensible. |
||||
# Also you need to specify the path to the ssl certificates. |
||||
|
||||
server { |
||||
listen 80; |
||||
listen [::]:80; |
||||
server_name _; |
||||
|
||||
# Enforce HTTPS |
||||
return 301 https://$server_name$request_uri; |
||||
} |
||||
|
||||
server { |
||||
listen 443 ssl http2; |
||||
listen [::]:443 ssl http2; |
||||
server_name _; |
||||
|
||||
ssl_certificate /path/to/fullchain.pem; |
||||
ssl_certificate_key /path/to/privkey.pem; |
||||
ssl_trusted_certificate /path/to/fullchain.pem; |
||||
|
||||
location / { |
||||
proxy_pass http://app:5000/; |
||||
proxy_set_header Host $host; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
proxy_set_header X-Forwarded-Proto $scheme; |
||||
} |
||||
} |
Loading…
Reference in new issue