diff --git a/CLAUDE.md b/CLAUDE.md index 99f38ac..8959695 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" + - "3001:3001" 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:3001; } upstream frontend { server frontend:80; } server { diff --git a/backend/src/main.rs b/backend/src/main.rs index 77771a9..3b7e781 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:3001"; 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..7e3b496 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" + - "3001:3001" frontend: build: ./frontend restart: unless-stopped ports: - - "3300:80" + - "3000:80" depends_on: - backend @@ -24,7 +24,7 @@ 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 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..7a1efb1 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:3001', changeOrigin: true, }, }, diff --git a/nginx-conf.conf b/nginx.conf similarity index 90% rename from nginx-conf.conf rename to nginx.conf index 00a86a3..6dac474 100644 --- a/nginx-conf.conf +++ b/nginx.conf @@ -3,7 +3,7 @@ events { } http { - upstream backend { server backend:3301; } + upstream backend { server backend:3001; } upstream frontend { server frontend:80; } server {