Skip to content

Commit

Permalink
Setup nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
SeoulSKY committed Sep 4, 2024
1 parent 43e179c commit f82e931
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

<div align="center">
<img src="https://img.shields.io/badge/Python-v3.11-blue">
<img src="https://img.shields.io/badge/Node.js-v21.6-84ba64">
<img src="https://img.shields.io/github/license/SeoulSKY/SoruSora">
<img src="https://img.shields.io/badge/SoruSora-online-green?style=flat&logo=discord">
<br>
Expand Down
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,22 @@ services:
volumes:
- ~/mongoDB:/data/db
restart: always

nginx:
image: nginx:1.27.1
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
restart: always

watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_POLL_INTERVAL=300
restart: always
22 changes: 22 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
server {
listen 80;
listen [::]:80;

server_name desdemona.seoulsky.org;

location / {
proxy_pass http://localhost:8080;
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;
}

location /api {
proxy_pass http://localhost:8000;
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;
}
}
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ pylint~=2.17.5
pytest~=7.4.0
pytest-asyncio~=0.21.1
python-dotenv~=1.0.0
opencv-python~=4.9.0.80
opencv-python~=4.10.0.82
tqdm~=4.66.1
motor~=3.3.2
fluent.runtime~=0.4.0
argostranslate~=1.9.1
google-generativeai~=0.6.0
cryptography~=42.0.8
ytnoti~=1.1.1
ytnoti~=2.1.0

0 comments on commit f82e931

Please sign in to comment.