Skip to content

Commit

Permalink
pub
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalkk committed Jul 10, 2024
1 parent f6878c3 commit d180021
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 42 deletions.
18 changes: 12 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
version: "3.8"

services:

nginx:
build: ./nginx
image: nginx:1.27-bookworm
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- backend
networks:
- webapp-network
- webapp-network

backend:
build: .
environment:
- API_KEY=
- HCAPTCHA_SECRET_KEY=
- HCAPTCHA_SITE_KEY=
- API_KEY=
- HCAPTCHA_SECRET_KEY=
- HCAPTCHA_SITE_KEY=
networks:
- webapp-network
- webapp-network

networks:
webapp-network:
2 changes: 0 additions & 2 deletions nginx/Dockerfile

This file was deleted.

45 changes: 11 additions & 34 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
# events { worker_connections 1024; }

# http {
# server {
# listen 80;

# location / {
# proxy_pass http://backend:5000/;
# }

# }
# }

server {
listen 80;
server_name stockplayground.rkk.icu;
location / {
return 301 https://$host$request_uri;
}

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
events {
worker_connections 1024;
}

server {
listen 443 ssl;
server_name stockplayground.rkk.icu;

ssl_certificate /etc/letsencrypt/live/stockplayground.rkk.icu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/stockplayground.rkk.icu/privkey.pem;

location / {
proxy_pass http://backend:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
http {
server {
listen 80;

location / {
proxy_pass http://backend:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
}

0 comments on commit d180021

Please sign in to comment.