ユーザ用ツール

サイト用ツール


サイドバー

このページの翻訳:



最近の更新



Tag Cloud

06_virtualization:05_container:08_docker_compose_nginx

文書の過去の版を表示しています。


08 docker-compose Nginx

Nginxを動かすだけのdocker-compose

docker-compose.yml

---
version: "2.1"
services:
  https-portal:
    image: steveltn/https-portal:1
    ports:
      - '80:80'
      - '443:443'
    links:
      - web
    #restart: always
    restart: unless-stopped
    environment:
      DOMAINS: 'testwiki.hogehoge.com -> http://web'
      STAGE: 'local'
      #STAGE: 'production'
      #FORCE_RENEW: 'true'
    volumes:
      - ./docker/web/:/etc/nginx/conf.d/
      
  web:
    image: nginx:1.15.6
    #ports:
    #- '8000:80'
    volumes:
     - ./nginx/conf.d:/etc/nginx/conf.d
     - ./nginx/html:/var/www/html

フォルダ用意

mkdir -p nginx/conf.d
mkdir -p nginx/html
# tree -l /app
/app
├── docker
│   └── web
├── docker-compose.yml
└── nginx
    ├── conf.d
    │   └── default.conf
    └── html
        └── index.html

起動

docker-compose up -d
06_virtualization/05_container/08_docker_compose_nginx.1640705434.txt.gz · 最終更新: 2021/12/29 00:30 by matsui