13693261870
9 天以前 0cc67c910ac3bebcc003755909c152c6889f425d
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
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: 5s
      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
    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
    #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/"
    depends_on:
      - redis
      - nacos
    networks:
      - network-se
    restart: always
  # 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/"
    depends_on:
      - postgis
      - nacos
      - redis
  # nginx
  nginx:
    image: nginx:1.29
    ports:
      - 8081:80
    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/nginx.conf:/etc/nginx/nginx.conf
    depends_on:
      - gateway
    networks:
      - network-jhs
networks:
  network-jhs:
    driver: bridge