Dockerで構築したPHP動作環境でLaravelフレームワーク動作させる。 (1)コンテナのシチュエーション version: '2' services: app: build: "./docker-file" ports: - "11180:80" volumes: - "./source-file:/var/www/html" links: - "mysql:mysql" - "postgres:postgres" postgres: image: postgres:9.4 environment: POSTGRES_USER: my_application POSTGRES_PASSWORD: my_application restart: always ports: - "5432:5432" volumes: - "postgres_db:/var/lib/postgresq
![Dockerで構築したPHP動作環境でLaravel実行の際のDB接続情報について - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/9f3f6948ad1a71ab803a47054cd7739990c15566/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-412672c5f0600ab9a64263b751f1bc81.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTk3MiZoPTM3OCZ0eHQ9RG9ja2VyJUUzJTgxJUE3JUU2JUE3JThCJUU3JUFGJTg5JUUzJTgxJTk3JUUzJTgxJTlGUEhQJUU1JThCJTk1JUU0JUJEJTlDJUU3JTkyJUIwJUU1JUEyJTgzJUUzJTgxJUE3TGFyYXZlbCVFNSVBRSU5RiVFOCVBMSU4QyVFMyU4MSVBRSVFOSU5QSU5QiVFMyU4MSVBRURCJUU2JThFJUE1JUU3JUI2JTlBJUU2JTgzJTg1JUU1JUEwJUIxJUUzJTgxJUFCJUUzJTgxJUE0JUUzJTgxJTg0JUUzJTgxJUE2JnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnR4dC1jb2xvcj0lMjMyMTIxMjEmdHh0LWZvbnQ9SGlyYWdpbm8lMjBTYW5zJTIwVzYmdHh0LXNpemU9NTYmcz1hMjI0ZDlkM2ZmYTM4YTI2NGUzNzc3ZDk0ZTBmNDhmMw%26mark-x%3D142%26mark-y%3D57%26blend64%3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