#-------------------------------------------------------------- # #. Tiny Static Web Server (writtren in Golang) 6MB # # Oject : test web server for MRZ # date : 2020.04.13 # author: ctxwing # #reference: "goStatic" #. : A really small static web server for Docker : 6MB.. 9 명 개발자 . 다운로드 5M+ . # [1] https://github.com/PierreZ/goStatic #. [2] https://hub.docker.com/r/pierrezemb/gostatic #. [3] https://hub.docker.com/r/pierrezemb/gostatic/dockerfile # author : ctxwing # #------------------------------------------------------------- # ports : 호스트 서버의 내부 외부 모두 공개 # expose: 호스트 서버 내부에만 포트 공개 # #------------------------------------------------------------- # 신규Instance 기동시 3군데 변경 # # [1] containder_name: ctx2_goStatic # [2] VIRTUAL_HOST=ctx2.contrixlab.co.kr # [3] LETSENCRYPT_HOST=ctx2.contrixlab.co.kr # expose 는 동일하게 8043 으로 유지 # (왜냐하면 ./nginx-proxy/conf.d/default.conf에서 # 호스트서버에 내부IP가 각 컨테이너별로 다르기 때문에 충돌하지 않음) # # -------------------------- # # ctx3.contrixlab.co.kr # upstream ctx3.contrixlab.co.kr { # ## Can be connected with "nginx-proxy" network # # ctx3_goStatic # server 172.21.0.4:8043; # } #------------------------------------------------------------- #------------------------------------------------------------- version: '3.6' services: gostatic: build: context: . dockerfile: ./Dockerfile_goStatic container_name: nginx-proxy_ctx2_goStatic #container_name: ctx3_goStatic #entrypoint: ./goStatic restart: always volumes: # host html doc root dir to container default /srv/http : refer above #2 #- ./HtmlDocRoot:/srv/http - ./:/srv/http #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Nginx Reverse Proxy 적용위한 환경변수 설정 # https://jm4488.tistory.com/63 expose: # 아래 virtual port와 같게 설정 - "8043" ##ports: ###- '60081:8043' ##- '60082:8043' environment: - VIRTUAL_HOST=ctx2.contrixlab.co.kr - VIRTUAL_PORT=8043 - LETSENCRYPT_HOST=ctx2.contrixlab.co.kr - LETSCRYPT_EMAIL=ctxwing@gmail.com networks: default: external: name: nginx-proxy #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~