Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.24 KB | None | 0 0
  1. ######################
  2. # docker-compose.yml #
  3. ######################
  4. version: '3.3'
  5.  
  6. services:
  7.     1_openvpn:
  8.          cap_add:
  9.             - NET_ADMIN
  10.          image: localhost:5000/kylemanna/openvpn-latest
  11.          container_name: 1_openvpn
  12.          ports:
  13.             - 10.64.0.101:1194:1194/udp
  14.          restart: always
  15.          volumes:
  16.             - /data/n_1/openvpn:/etc/openvpn
  17.          # is service is connected to both the internal network subnet
  18.          # and the host connected network doorway
  19.          networks:
  20.              1_subnet:
  21.              1_doorway:
  22.                  ipv4_address: 10.64.0.80
  23.  
  24.     1_apache:
  25.         image: localhost:5000/php-7.2-apache
  26.         container_name: 1_apache
  27.         restart: always
  28.         environment:
  29.            - ALLOW_OVERRIDE=true
  30.         ports:
  31.            - 81
  32.         depends_on:
  33.            - 1_db
  34.         links:
  35.            - 1_db
  36.         volumes:
  37.            - /data/n_1/apache:/var/lib/apache
  38.         networks:
  39.            - 1_subnet
  40.  
  41.     1_db:
  42.      # original image
  43.      #image: mariadb
  44.         image: localhost:5000/mariadb-latest
  45.         container_name: 1_db
  46.         restart: always
  47.         volumes:
  48.          - /data/n_1/db:/var/lib/db
  49.         environment:
  50.             MYSQL_ROOT_PASSWORD:
  51.             MYSQL_USER: mysql_user
  52.             MYSQL_PASSWORD: mysql_password
  53.             MYSQL_DATABASE: 1_database
  54.         ports:
  55.            - 3306
  56.         networks:
  57.            - 1_subnet
  58.  
  59.     1_phpmyadmin:
  60.     # original image
  61.      #image: phpmyadmin/phpmyadmin:latest
  62.       image: localhost:5000/phpmyadmin/phpmyadmin-latest
  63.       container_name: 1_phpmyadmin
  64.       restart: always
  65.       volumes:
  66.        - /data/n_1/phpmyadmin:/var/lib/phpmyadmin
  67.       depends_on:
  68.        - 1_db
  69.       links:
  70.        - 1_db
  71.       ports:
  72.        - 8890:80
  73.       environment:
  74.         MYSQL_USER: mysql_user
  75.         MYSQL_PASSWORD: mysql_password
  76.         MYSQL_DATABASE: 1_database
  77.       networks:
  78.        - 1_subnet
  79.  
  80.     1_samba:
  81.         volumes:
  82. #       - ./app:/var/www/html
  83.             - /data/n_1/samba:/var/lib/samba
  84.      # original image
  85.      #image: dperson/samba
  86.         image: localhost:5000/dperson/samba-latest
  87.         container_name: 1_samba
  88.         ports:
  89.            - 139
  90.             - 445
  91.             - 137/udp
  92.             - 138/udp
  93.         command: '-s "x;/var/www/html;yes;no;yes;all"'
  94.         networks:
  95.            - 1_subnet
  96.  
  97.     1_thecodingmachine:
  98.     # original image
  99.      #image: thecodingmachine/php:7.2-v1-cli
  100.         image: localhost:5000/thecodingmachine/php-7.2-v1-cli
  101.         container_name: 1_thecodingmachine
  102.         volumes:
  103.           - /data/n_1/thecodingmachine:/var/lib/thecodingmachine
  104.         ports:
  105.            - 22
  106.             - 81
  107.         stdin_open: true
  108.         tty: true
  109.         networks:
  110.            - 1_subnet
  111.  
  112. networks:
  113.  # this network only has local access
  114.     1_subnet:
  115.         driver: bridge
  116.         internal: true
  117.     # this network is host based and has internet access for VPN connections
  118.     1_doorway:
  119.         driver: macvlan
  120.         driver_opts:
  121.             parent: eth0
  122.         ipam:
  123.              config:
  124. #                - gateway: 10.64.0.1
  125.                 - subnet: 10.64.0.0/24
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement