2
0

新建部署配置

This commit is contained in:
2025-12-19 14:20:00 +08:00
commit da82f77082
4 changed files with 125 additions and 0 deletions

76
docker-compose.yaml Normal file
View File

@@ -0,0 +1,76 @@
name: lanhu-prod
services:
postgres:
image: postgres:17.7
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "localhost:${DB_PORT}:{DB_PORT}"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
restart: unless-stopped
logging:
driver: local
redis:
image: redis:7.4
ports:
- "localhost:${REDIS_PORT}:{REDIS_PORT}"
volumes:
- redis_data:/data
restart: unless-stopped
logging:
driver: local
platform:
image: ghcr.io/wyongk/juip-proxy-back:main
env_file:
- .env
- .env.platform
depends_on:
- postgres
- redis
restart: unless-stopped
logging:
driver: local
web:
image: ghcr.io/wyongk/juip-proxy-react:main
env_file:
- .env
- .env.web
depends_on:
- platform
restart: unless-stopped
logging:
driver: local
# task:
# image: ghcr.io/wyongk/juip-proxy-task:main
# env_file:
# - .env
# - .env.task
# depends_on:
# - platform
# restart: unless-stopped
caddy:
image: caddy:latest
ports:
- "80:80"
- "443:443"
volumes:
- ./caddy/config:/etc/caddy
- caddy_data:/data
restart: unless-stopped
logging:
driver: local
volumes:
postgres_data:
redis_data:
caddy_data: