From a20edd8cc3edf4337493222497d4a6f1ffc0922f Mon Sep 17 00:00:00 2001 From: Arnaud Nelissen Date: Fri, 10 Apr 2026 00:25:43 +0200 Subject: [PATCH] remove nginx --- CLAUDE.md | 12 ++++++------ backend/src/main.rs | 2 +- docker-compose.yml | 4 ++-- frontend/Dockerfile | 6 +----- frontend/vite.config.ts | 2 +- nginx-conf.conf | 2 +- 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 99f38ac..657872e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -90,7 +90,7 @@ astronome/ │ │ ├── tokens.css │ │ └── global.css ├── docker-compose.yml -└── nginx-conf.conf +└── nginx.conf ``` --- @@ -777,13 +777,13 @@ services: - DATABASE_URL=sqlite:///data/astronome.db - RUST_LOG=info ports: - - "3301:3301" + - "3010:3010" frontend: build: ./frontend restart: unless-stopped ports: - - "3300:80" + - "3000:80" depends_on: - backend @@ -793,15 +793,15 @@ services: ports: - "80:80" volumes: - - ./nginx-conf.conf:/etc/nginx/nginx-conf.conf:ro + - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: - backend - frontend ``` ```nginx -# nginx-conf.conf — reverse proxy, single origin for browser -upstream backend { server backend:3301; } +# nginx.conf — reverse proxy, single origin for browser +upstream backend { server backend:3010; } upstream frontend { server frontend:80; } server { diff --git a/backend/src/main.rs b/backend/src/main.rs index 77771a9..255db4d 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -37,7 +37,7 @@ async fn main() -> anyhow::Result<()> { 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); let listener = tokio::net::TcpListener::bind(bind_addr).await?; diff --git a/docker-compose.yml b/docker-compose.yml index 4829f45..3c7c691 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,13 +8,13 @@ services: - DATABASE_URL=sqlite:///data/astronome.db - RUST_LOG=info ports: - - "3301:3301" + - "3010:3010" frontend: build: ./frontend restart: unless-stopped ports: - - "3300:80" + - "3000:80" depends_on: - backend diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 07dbb02..06c8327 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -3,8 +3,4 @@ WORKDIR /app COPY package*.json ./ RUN npm ci COPY . . -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 +RUN npm run build \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index bd97144..33aed0a 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ server: { proxy: { '/api': { - target: 'http://localhost:3301', + target: 'http://localhost:3010', changeOrigin: true, }, }, diff --git a/nginx-conf.conf b/nginx-conf.conf index 00a86a3..63268c0 100644 --- a/nginx-conf.conf +++ b/nginx-conf.conf @@ -3,7 +3,7 @@ events { } http { - upstream backend { server backend:3301; } + upstream backend { server backend:3010; } upstream frontend { server frontend:80; } server {