13693261870
7 天以前 3701213986cfe65042d459a832207ae0b76f0989
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: "3.8"
services:
  # postgis
  postgis:
    image: postgis/postgis:17.5
    ports:
      - 5432:5432
    volumes:
      - ./postgis/pgdata:/var/lib/postgresql/data
      - ./postgis/init:/docker-entrypoint-initdb.d
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: Postgres!_17_jHs
      ALLOW_IP_RANGE: 0.0.0.0/0
      TZ: Asia/Shanghai
      POSTGRES_DB: jhs
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 2s
      retries: 3
    privileged: true
    networks:
      - network-jhs
  # nacos
  nacos:
    image: nacos/nacos-server:v3.0.2
    environment:
      TZ: Asia/Shanghai
      MODE: standalone
      SPRING_DATASOURCE_PLATFORM: postgresql
      DB_URL: jdbc:postgresql://postgis:5432/jhs?tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=nacos_java
      DB_USER: postgres
      DB_PASSWORD: Postgres!_17_jHs
      NACOS_AUTH_ENABLE: true
      NACOS_AUTH_IDENTITY_KEY: nacos
      NACOS_AUTH_IDENTITY_VALUE: nAcos_!9#_admIn
      DB_POOL_CONFIG_DRIVERCLASSNAME: org.postgresql.Driver
      NACOS_AUTH_TOKEN: TmFjb3NfUmFuZG9tX1N0cmluZ18zMl9DaGFyc19Pcl9Mb25nZXI=
    volumes:
      - ./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
      - 9848:9848
    depends_on:
      postgis:
        condition: service_healthy
    privileged: true
    networks:
      - network-jhs
    #restart: always
  # redis
  redis:
    image: redis:7
    ports:
      - 6379:6379
    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:
      - network-jhs
  # gateway
  gateway:
    image: openjdk:8-jre
    volumes:
      - ./gateway/logs:/logs
      - ./gateway:/app
    environment:
      TZ: Asia/Shanghai
    #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:
        condition: service_healthy
      nacos:
        condition: service_healthy
    networks:
      - network-jhs
  # system
  system:
    image: openjdk8-422-gdal:3.5.2
    volumes:
      - ./system/logs:/logs
      - ./system:/app
    environment:
      TZ: Asia/Shanghai
    #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:
        condition: service_healthy
      redis:
        condition: service_healthy
      nacos:
        condition: service_healthy
    networks:
      - network-jhs
  # nginx
  nginx:
    image: nginx:1.29
    ports:
      - 80:80
      - 443:443
    environment:
      TZ: Asia/Shanghai
    volumes:
      - ./nginx/logs:/var/log/nginx
      - ./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
      - system
    networks:
      - network-jhs
networks:
  network-jhs:
    driver: bridge