17
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

docker-compose サービス名の一覧を取得する

Posted at

docker-compose サービス名の一覧

$ docker-compose config --service
app
web
db
db-testing
node
redis
mail

備考

--service オプションを指定しない場合は docker-compose.yml の内容が変数などすべて展開された状態で表示されます。

$ docker-compose config
services:
  app:
    build:
      args:
        TZ: Asia/Tokyo
      context: /Users/ucan/work/docker-laravel/docker/php
    environment:
      CACHE_DRIVER: redis
      DB_CONNECTION: mysql
      DB_DATABASE: homestead
      DB_HOST: db
      DB_PASSWORD: secret
      DB_USERNAME: homestead
      MAIL_HOST: mail
      MAIL_PORT: '1025'
      QUEUE_DRIVER: redis
      REDIS_HOST: redis
      SESSION_DRIVER: redis
      TZ: Asia/Tokyo
    ports:
    - 18000:8000/tcp
    volumes:
    - /Users/ucan/work/docker-laravel/src:/work:rw
    - /Users/ucan/work/docker-laravel/docker/ash:/etc/profile.d:rw
    - /Users/ucan/work/docker-laravel/docker/php/psysh:/root/.config/psysh:rw
    - /Users/ucan/work/docker-laravel/logs:/var/log/php:rw
    - /Users/ucan/work/docker-laravel/docker/php/php.ini:/usr/local/etc/php/php.ini:rw
    working_dir: /work
  db:
    environment:
      MYSQL_DATABASE: homestead
      MYSQL_PASSWORD: secret
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_USER: homestead
      TZ: Asia/Tokyo
    image: mysql:8.0
    ports:
    - 13306:3306/tcp
    volumes:
    - db-store:/var/lib/mysql:rw
    - /Users/ucan/work/docker-laravel/logs:/var/log/mysql:rw
    - /Users/ucan/work/docker-laravel/docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf:rw
  db-testing:
    environment:
      MYSQL_DATABASE: homestead
      MYSQL_PASSWORD: secret
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_USER: homestead
      TZ: Asia/Tokyo
    image: mysql:8.0
    ports:
    - 13307:3306/tcp
    tmpfs:
    - /var/lib/mysql
    - /var/log/mysql
    volumes:
    - /Users/ucan/work/docker-laravel/docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf:rw
  mail:
    image: mailhog/mailhog
    ports:
    - 18025:8025/tcp
  node:
    image: node:12.14-alpine
    tty: true
    volumes:
    - /Users/ucan/work/docker-laravel/src:/work:rw
    working_dir: /work
  redis:
    image: redis:5.0-alpine
    volumes:
    - redis-store:/data:rw
  web:
    depends_on:
    - app
    environment:
      TZ: Asia/Tokyo
    image: nginx:1.17-alpine
    ports:
    - 10080:80/tcp
    volumes:
    - /Users/ucan/work/docker-laravel/src:/work:rw
    - /Users/ucan/work/docker-laravel/logs:/var/log/nginx:rw
    - /Users/ucan/work/docker-laravel/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:rw
version: '3.0'
volumes:
  db-store: {}
  redis-store: {}

参考

17
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?