feat: 添加Nginx反代支持
This commit is contained in:
@@ -39,6 +39,41 @@ services:
|
||||
networks:
|
||||
- stock-scanner-network
|
||||
|
||||
nginx:
|
||||
image: nginx:stable-alpine
|
||||
container_name: stock-scanner-nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./nginx/logs:/var/log/nginx
|
||||
- ./nginx/ssl:/etc/nginx/ssl
|
||||
depends_on:
|
||||
- app
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:80"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.1'
|
||||
memory: 128M
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
networks:
|
||||
- stock-scanner-network
|
||||
|
||||
networks:
|
||||
stock-scanner-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user