• docker-compose之跳板机jumpserver部署


    下载docker-compose

    1 curl -L https://get.daocloud.io/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
    2 chmod +x /usr/local/bin/docker-compose

    docker-compose.yml

      1 version: '3'
      2 services:
      3   mysql:
      4     image: mysql:5.7
      5     container_name: jms_mysql
      6     restart: always
      7     tty: true
      8     environment:
      9       MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
     10       MYSQL_DATABASE: jumpserver
     11     command: --character-set-server=utf8
     12     volumes:
     13       - db-data:/var/lib/mysql
     14     networks:
     15       - jumpserver
     16 
     17   redis:
     18     image: redis:alpine
     19     container_name: jms_redis
     20     restart: always
     21     tty: true
     22     volumes:
     23       - redis-data:/data
     24     networks:
     25       - jumpserver
     26 
     27   core:
     28     build: ./core
     29     image: wojiushixiaobai/jms_core:${Version}
     30     container_name: jms_core
     31     hostname: jms_core
     32     restart: always
     33     tty: true
     34     environment:
     35       SECRET_KEY: $SECRET_KEY
     36       BOOTSTRAP_TOKEN: $BOOTSTRAP_TOKEN
     37       DB_ENGINE: mysql
     38       DB_HOST: mysql
     39       DB_PORT: 3306
     40       DB_USER: root
     41       DB_PASSWORD: $MYSQL_ROOT_PASSWORD
     42       DB_NAME: jumpserver
     43       REDIS_HOST: redis
     44     depends_on:
     45       - mysql
     46       - redis
     47     volumes:
     48       - static:/opt/jumpserver/data/static
     49       - media:/opt/jumpserver/data/media
     50       - logs:/opt/jumpserver/logs
     51     networks:
     52       - jumpserver
     53 
     54   koko:
     55     build: ./koko
     56     image: wojiushixiaobai/jms_koko:${Version}
     57     container_name: jms_coco
     58     restart: always
     59     tty: true
     60     environment:
     61       CORE_HOST: http://core:8080
     62       BOOTSTRAP_TOKEN: $BOOTSTRAP_TOKEN
     63     depends_on:
     64       - core
     65       - mysql
     66       - redis
     67     volumes:
     68       - keys-data:/opt/coco/keys
     69     ports:
     70       - 2222:2222
     71     networks:
     72       - jumpserver
     73 
     74   guacamole:
     75     build: ./guacamole
     76     image: wojiushixiaobai/jms_guacamole:${Version}
     77     container_name: jms_guacamole
     78     restart: always
     79     tty: true
     80     environment:
     81       JUMPSERVER_SERVER: http://core:8080
     82       BOOTSTRAP_TOKEN: $BOOTSTRAP_TOKEN
     83       JUMPSERVER_KEY_DIR: /config/guacamole/keys
     84       GUACAMOLE_HOME: /config/guacamole
     85     depends_on:
     86       - core
     87       - mysql
     88       - redis
     89     volumes:
     90       - gua-key:/config/guacamole/keys
     91     networks:
     92       - jumpserver
     93 
     94   nginx:
     95     build: ./nginx
     96     image: wojiushixiaobai/jms_nginx:${Version}
     97     container_name: jms_nginx
     98     restart: always
     99     tty: true
    100     depends_on:
    101       - core
    102       - koko
    103       - mysql
    104       - redis
    105     volumes:
    106       - static:/opt/jumpserver/data/static
    107       - media:/opt/jumpserver/data/media
    108     ports:
    109       - 18080:80
    110     networks:
    111       - jumpserver
    112 
    113 volumes:
    114   static:
    115   media:
    116   logs:
    117   db-data:
    118   redis-data:
    119   keys-data:
    120   gua-key:
    121 
    122 networks:
    123   jumpserver:

    其他配置文件拉取github:https://github.com/lvelvis/jumpserver-docker.git

  • 相关阅读:
    分治策略
    uva 11424
    lightoj 1214
    lightoj 1282 && uva 11029
    lightoj 1341
    zoj 2369 Two Cylinders
    几种素数筛法
    lightoj 1245
    hdoj 1299 Diophantus of Alexandria
    求前n项正整数的倒数和
  • 原文地址:https://www.cnblogs.com/lvcisco/p/11611681.html
Copyright © 2020-2023  润新知