13693261870
8 天以前 097c95714ed960ab8e997c26355603bf0448e92b
docker/docker-compose.yml
@@ -16,7 +16,7 @@
      POSTGRES_DB: jhs
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      interval: 10s
      timeout: 2s
      retries: 3
    privileged: true
@@ -41,6 +41,12 @@
      - ./nacos/logs/:/home/nacos/logs
      - ./nacos/plugins:/home/nacos/plugins
      #- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
    healthcheck:
      test: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]
      interval: 10s
      timeout: 2s
      retries: 3
      start_period: 7s
    ports:
      - 8080:8080
      - 8848:8848
@@ -51,7 +57,7 @@
    privileged: true
    networks:
      - network-jhs
    restart: always
    #restart: always
  # redis
  redis:
    image: redis:7
@@ -60,6 +66,11 @@
    volumes:
      - ./redis/redis.conf:/data/redis.conf
      - ./redis/data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 2s
      retries: 3
    #command: redis-server --requirepass Redis_s!E_6.2.6
    command: redis-server /data/redis.conf
    networks:
@@ -72,10 +83,13 @@
      - ./gateway:/app
    environment:
      TZ: Asia/Shanghai
    entrypoint: /bin/sh -c "sleep 30 && java -jar /app/se-gateway.jar --spring.config.location=file:/app/"
    #entrypoint: /bin/sh -c "sleep 30 && java -jar /app/se-gateway.jar --spring.config.location=file:/app/"
    entrypoint: java -jar /app/se-gateway.jar --spring.config.location=file:/app/
    depends_on:
      - redis
      - nacos
      redis:
        condition: service_healthy
      nacos:
        condition: service_healthy
    networks:
      - network-jhs
  # system
@@ -86,11 +100,15 @@
      - ./system:/app
    environment:
      TZ: Asia/Shanghai
    entrypoint: /bin/sh -c "sleep 30 && java -jar /app/se-system.jar --spring.config.location=file:/app/"
    #entrypoint: /bin/sh -c "sleep 30 && java -jar /app/se-system.jar --spring.config.location=file:/app/"
    entrypoint: java -jar /app/se-system.jar --spring.config.location=file:/app/
    depends_on:
      - postgis
      - nacos
      - redis
      postgis:
        condition: service_healthy
      redis:
        condition: service_healthy
      nacos:
        condition: service_healthy
    networks:
      - network-jhs
  # nginx
@@ -98,12 +116,13 @@
    image: nginx:1.29
    ports:
      - 80:80
      - 443:443
    environment:
      TZ: Asia/Shanghai
    volumes:
      - ./nginx/logs:/var/log/nginx
      #- ./nginx/conf.d:/etc/nginx/conf.d
      - ./nginx/html:/usr/share/nginx/html
      - ./nginx/conf/conf.d:/etc/nginx/conf.d
      - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
    depends_on:
      - gateway