remove nginx

This commit is contained in:
2026-04-10 00:25:43 +02:00
parent 9223e4d35f
commit a20edd8cc3
6 changed files with 12 additions and 16 deletions
+6 -6
View File
@@ -90,7 +90,7 @@ astronome/
│ │ ├── tokens.css │ │ ├── tokens.css
│ │ └── global.css │ │ └── global.css
├── docker-compose.yml ├── docker-compose.yml
└── nginx-conf.conf └── nginx.conf
``` ```
--- ---
@@ -777,13 +777,13 @@ services:
- DATABASE_URL=sqlite:///data/astronome.db - DATABASE_URL=sqlite:///data/astronome.db
- RUST_LOG=info - RUST_LOG=info
ports: ports:
- "3301:3301" - "3010:3010"
frontend: frontend:
build: ./frontend build: ./frontend
restart: unless-stopped restart: unless-stopped
ports: ports:
- "3300:80" - "3000:80"
depends_on: depends_on:
- backend - backend
@@ -793,15 +793,15 @@ services:
ports: ports:
- "80:80" - "80:80"
volumes: volumes:
- ./nginx-conf.conf:/etc/nginx/nginx-conf.conf:ro - ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on: depends_on:
- backend - backend
- frontend - frontend
``` ```
```nginx ```nginx
# nginx-conf.conf — reverse proxy, single origin for browser # nginx.conf — reverse proxy, single origin for browser
upstream backend { server backend:3301; } upstream backend { server backend:3010; }
upstream frontend { server frontend:80; } upstream frontend { server frontend:80; }
server { server {
+1 -1
View File
@@ -37,7 +37,7 @@ async fn main() -> anyhow::Result<()> {
let app = api::build_router(pool).layer(cors); let app = api::build_router(pool).layer(cors);
let bind_addr = "0.0.0.0:3301"; let bind_addr = "0.0.0.0:3010";
tracing::info!("Starting server on {}", bind_addr); tracing::info!("Starting server on {}", bind_addr);
let listener = tokio::net::TcpListener::bind(bind_addr).await?; let listener = tokio::net::TcpListener::bind(bind_addr).await?;
+2 -2
View File
@@ -8,13 +8,13 @@ services:
- DATABASE_URL=sqlite:///data/astronome.db - DATABASE_URL=sqlite:///data/astronome.db
- RUST_LOG=info - RUST_LOG=info
ports: ports:
- "3301:3301" - "3010:3010"
frontend: frontend:
build: ./frontend build: ./frontend
restart: unless-stopped restart: unless-stopped
ports: ports:
- "3300:80" - "3000:80"
depends_on: depends_on:
- backend - backend
-4
View File
@@ -4,7 +4,3 @@ COPY package*.json ./
RUN npm ci RUN npm ci
COPY . . COPY . .
RUN npm run build RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx-frontend.conf /etc/nginx/conf.d/default.conf
+1 -1
View File
@@ -6,7 +6,7 @@ export default defineConfig({
server: { server: {
proxy: { proxy: {
'/api': { '/api': {
target: 'http://localhost:3301', target: 'http://localhost:3010',
changeOrigin: true, changeOrigin: true,
}, },
}, },
+1 -1
View File
@@ -3,7 +3,7 @@ events {
} }
http { http {
upstream backend { server backend:3301; } upstream backend { server backend:3010; }
upstream frontend { server frontend:80; } upstream frontend { server frontend:80; }
server { server {