remove nginx
This commit is contained in:
@@ -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
@@ -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
@@ -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
|
||||||
|
|
||||||
|
|||||||
+1
-5
@@ -3,8 +3,4 @@ WORKDIR /app
|
|||||||
COPY package*.json ./
|
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
|
|
||||||
@@ -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
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user