mirror of
https://github.com/BgaSol/sol-cloud
synced 2026-05-06 16:18:30 +00:00
238 lines
No EOL
6 KiB
YAML
238 lines
No EOL
6 KiB
YAML
networks:
|
|
cloud-app:
|
|
driver: bridge
|
|
services:
|
|
cloud-app-nginx:
|
|
image: nginx:alpine
|
|
container_name: cloud-app-nginx
|
|
restart: unless-stopped
|
|
environment:
|
|
TZ: ${TZ}
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./output/client:/usr/share/nginx/html:ro
|
|
networks:
|
|
- cloud-app
|
|
depends_on:
|
|
- cloud-server-gateway
|
|
cloud-server-gateway:
|
|
image: amazoncorretto:17.0.15
|
|
working_dir: /app
|
|
command:
|
|
- java
|
|
- -Dfile.encoding=UTF-8
|
|
- -jar
|
|
- app.jar
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./output/server/gateway-9527/:/app/:ro
|
|
ports:
|
|
- "9527:9527"
|
|
networks:
|
|
- cloud-app
|
|
environment:
|
|
TZ: ${TZ}
|
|
|
|
NACOS_HOST: cloud-app-nacos
|
|
NACOS_PORT: 8848
|
|
NACOS_USER: ${NACOS_USER}
|
|
NACOS_PASSWORD: ${NACOS_PASSWORD}
|
|
|
|
REDIS_HOST: cloud-app-redis
|
|
REDIS_PORT: 6379
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
|
depends_on:
|
|
- cloud-app-nacos
|
|
- cloud-app-redis
|
|
cloud-server-web-system:
|
|
image: amazoncorretto:17.0.15
|
|
working_dir: /app
|
|
command:
|
|
- java
|
|
- -Dfile.encoding=UTF-8
|
|
- -jar
|
|
- app.jar
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8081:8081"
|
|
volumes:
|
|
- ./output/server/web-system-8081/:/app/:ro
|
|
environment:
|
|
TZ: ${TZ}
|
|
|
|
SYSTEM_TITLE_NAME: ${SYSTEM_TITLE_NAME}
|
|
SYSTEM_CAPTCHA_MAX: ${SYSTEM_CAPTCHA_MAX}
|
|
SYSTEM_CAPTCHA_LENGTH: ${SYSTEM_CAPTCHA_LENGTH}
|
|
|
|
POSTGRES_HOST: cloud-app-postgres
|
|
POSTGRES_PORT: 5432
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
|
|
NACOS_HOST: cloud-app-nacos
|
|
NACOS_PORT: 8848
|
|
NACOS_USER: ${NACOS_USER}
|
|
NACOS_PASSWORD: ${NACOS_PASSWORD}
|
|
|
|
REDIS_HOST: cloud-app-redis
|
|
REDIS_PORT: 6379
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
|
|
|
ENABLE_SWAGGER: ${ENABLE_SWAGGER}
|
|
networks:
|
|
- cloud-app
|
|
depends_on:
|
|
- cloud-app-nacos
|
|
- cloud-app-redis
|
|
- cloud-app-postgres
|
|
cloud-server-web-file:
|
|
image: amazoncorretto:17.0.15
|
|
working_dir: /app
|
|
command:
|
|
- java
|
|
- -Dfile.encoding=UTF-8
|
|
- -jar
|
|
- app.jar
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./output/server/web-file-8082/:/app/:ro
|
|
ports:
|
|
- "8082:8082"
|
|
environment:
|
|
TZ: ${TZ}
|
|
|
|
POSTGRES_HOST: cloud-app-postgres
|
|
POSTGRES_PORT: 5432
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
|
|
NACOS_HOST: cloud-app-nacos
|
|
NACOS_PORT: 8848
|
|
NACOS_USER: ${NACOS_USER}
|
|
NACOS_PASSWORD: ${NACOS_PASSWORD}
|
|
|
|
REDIS_HOST: cloud-app-redis
|
|
REDIS_PORT: 6379
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
|
|
|
ENABLE_SWAGGER: ${ENABLE_SWAGGER}
|
|
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
MINIO_HOST: cloud-app-minio
|
|
MINIO_PORT: 9000
|
|
networks:
|
|
- cloud-app
|
|
depends_on:
|
|
- cloud-server-web-system
|
|
- cloud-app-minio
|
|
|
|
# Nacos
|
|
cloud-app-nacos:
|
|
image: nacos/nacos-server:v2.5.1
|
|
container_name: cloud-app-nacos
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8848:8848"
|
|
- "9848:9848"
|
|
- "9849:9849"
|
|
environment:
|
|
TZ: ${TZ}
|
|
MODE: standalone
|
|
NACOS_APPLICATION_PORT: 8848
|
|
DB_SERVICE_NAME: postgresql
|
|
DB_SERVICE_HOST: cloud-app-postgres
|
|
DB_SERVICE_PORT: 5432
|
|
DB_SERVICE_DB_NAME: nacos
|
|
DB_SERVICE_USER: ${POSTGRES_USER}
|
|
DB_SERVICE_PASSWORD: ${POSTGRES_PASSWORD}
|
|
NACOS_AUTH_ENABLE: true
|
|
NACOS_AUTH_TOKEN: ${NACOS_AUTH_TOKEN}
|
|
NACOS_AUTH_IDENTITY_KEY: ${NACOS_AUTH_IDENTITY_KEY}
|
|
NACOS_AUTH_IDENTITY_VALUE: ${NACOS_AUTH_IDENTITY_SECRET}
|
|
networks:
|
|
- cloud-app
|
|
volumes:
|
|
- ./data/nacos/logs:/home/nacos/logs
|
|
- ./config/nacos/conf/application.properties:/home/nacos/conf/application.properties
|
|
- ./config/nacos/plugins/:/home/nacos/plugins/
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://localhost:8848/nacos/v1/console/namespaces?&namespaceId=" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
# Minio 服务
|
|
cloud-app-minio:
|
|
image: minio/minio:RELEASE.2024-11-07T00-52-20Z
|
|
container_name: cloud-app-minio
|
|
restart: unless-stopped
|
|
command:
|
|
- server
|
|
- /data
|
|
- --console-address
|
|
- :9001
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
TZ: ${TZ}
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
volumes:
|
|
- ./data/minio/data:/data
|
|
- ./data/minio/root/.minio:/root/.minio
|
|
networks:
|
|
- cloud-app
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
# PostgreSQL 数据库服务
|
|
cloud-app-postgres:
|
|
image: postgres:17.2
|
|
container_name: cloud-app-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
TZ: ${TZ}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- ./data/postgres/data:/var/lib/postgresql/data
|
|
- ./data/postgres/log:/var/log/postgresql
|
|
- ./config/postgres/initdb:/docker-entrypoint-initdb.d:ro
|
|
- ./config/postgres/conf/postgresql.conf:/etc/postgresql/postgresql.conf:ro
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- cloud-app
|
|
healthcheck:
|
|
test: [ "CMD", "pg_isready", "-U", "postgres" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
# Redis 服务
|
|
cloud-app-redis:
|
|
image: redis:7.4.2
|
|
container_name: cloud-app-redis
|
|
restart: unless-stopped
|
|
environment:
|
|
TZ: ${TZ}
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- redis-server --maxmemory 8gb --maxmemory-policy allkeys-lru --appendonly yes --requirepass $$REDIS_PASSWORD
|
|
volumes:
|
|
- ./data/redis/data:/data
|
|
ports:
|
|
- "6379:6379"
|
|
networks:
|
|
- cloud-app
|
|
healthcheck:
|
|
test: [ "CMD", "redis-cli", "ping" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3 |