Álvaro Valenzuela Valdes commited on
Commit ·
512ad5f
1
Parent(s): 1c92e64
fix: Move DB to /tmp for write permissions and simplify Nginx network rules
Browse files- Dockerfile +1 -1
- nginx.conf +1 -5
Dockerfile
CHANGED
|
@@ -12,7 +12,7 @@ RUN npm run build
|
|
| 12 |
# Final Image
|
| 13 |
FROM python:3.12-slim
|
| 14 |
WORKDIR /app
|
| 15 |
-
ENV DATABASE_URL="sqlite:////
|
| 16 |
ENV PYTHONUNBUFFERED=1
|
| 17 |
|
| 18 |
# Install Node.js (for running frontend in dev/ssr mode) and Nginx
|
|
|
|
| 12 |
# Final Image
|
| 13 |
FROM python:3.12-slim
|
| 14 |
WORKDIR /app
|
| 15 |
+
ENV DATABASE_URL="sqlite:////tmp/andesops.db"
|
| 16 |
ENV PYTHONUNBUFFERED=1
|
| 17 |
|
| 18 |
# Install Node.js (for running frontend in dev/ssr mode) and Nginx
|
nginx.conf
CHANGED
|
@@ -1,24 +1,20 @@
|
|
| 1 |
server {
|
| 2 |
listen 7860;
|
| 3 |
-
server_name localhost;
|
| 4 |
|
| 5 |
location / {
|
| 6 |
-
proxy_pass http://
|
| 7 |
proxy_http_version 1.1;
|
| 8 |
proxy_set_header Upgrade $http_upgrade;
|
| 9 |
proxy_set_header Connection 'upgrade';
|
| 10 |
proxy_set_header Host $host;
|
| 11 |
-
proxy_cache_bypass $http_upgrade;
|
| 12 |
}
|
| 13 |
|
| 14 |
location /api {
|
| 15 |
proxy_pass http://127.0.0.1:8000;
|
| 16 |
proxy_set_header Host $host;
|
| 17 |
-
proxy_set_header X-Real-IP $remote_addr;
|
| 18 |
}
|
| 19 |
|
| 20 |
location /health {
|
| 21 |
proxy_pass http://127.0.0.1:8000/api/health;
|
| 22 |
-
proxy_set_header Host $host;
|
| 23 |
}
|
| 24 |
}
|
|
|
|
| 1 |
server {
|
| 2 |
listen 7860;
|
|
|
|
| 3 |
|
| 4 |
location / {
|
| 5 |
+
proxy_pass http://127.0.0.1:3000;
|
| 6 |
proxy_http_version 1.1;
|
| 7 |
proxy_set_header Upgrade $http_upgrade;
|
| 8 |
proxy_set_header Connection 'upgrade';
|
| 9 |
proxy_set_header Host $host;
|
|
|
|
| 10 |
}
|
| 11 |
|
| 12 |
location /api {
|
| 13 |
proxy_pass http://127.0.0.1:8000;
|
| 14 |
proxy_set_header Host $host;
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
location /health {
|
| 18 |
proxy_pass http://127.0.0.1:8000/api/health;
|
|
|
|
| 19 |
}
|
| 20 |
}
|