1
0

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 1 year has passed since last update.

【Docker】複数のdocker-compose.ymlのネットワークを繋げる方法

Posted at

はじめに

 本記事は、プログラミング初学者、学習を進めていて疑問に思った点について調べた結果を備忘録も兼ねてまとめたものです。
 そのため、記事の内容に誤りが含まれている可能性があります。ご容赦ください。
 間違いを見つけた方は、お手数ですが、ご指摘いただけますと幸いです。

複数のdocker-compose.ymlのネットワークを繋げる方法

Docker-compose.yml

docker-compose.yml
version: '3'
 
services:
  drakov:
    build: .
    ports:
      - "3001:3001"
    volumes:
      - "./docs:/projects"
    tty: true
    command: drakov -f "**/*.md" --public --watch --p 3001
docker-compose.yml
version: '3'
 
services:
  app:
    build: .
    ports:
      - "3000:3000"
    volumes:
      - ".:/projects"
    tty: true
    networks:
      - [APIのネットワーク名]
networks:
    [APIのネットワーク名]:
      external: true
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?