incudata-loghy / loghy-sample

MIT License
2 stars 0 forks source link

Access laravle's environment variables from docker-compose.yml environment variables. #1

Open s-takayanagi-incudata opened 2 years ago

s-takayanagi-incudata commented 2 years ago

Purpose

To make it convenient to include .env files in docker-compose.yml when launching with CI/CDE tools.

Proposal

I would like to add the following items to the app container in docker-compose.yml.

    environment:
      - DB_CONNECTION=mysql
      - DB_HOST=db
      - DB_PORT=3306
      - DB_DATABASE=${DB_NAME:-laravel_local}
      - DB_USERNAME=${DB_USER:-phper}
      - DB_PASSWORD=${DB_PASS:-secret}
    environment:
      - DB_CONNECTION=mysql
      - DB_HOST=db
      - DB_PORT=3306
      - DB_DATABASE=${DB_NAME:-laravel_local}
      - DB_USERNAME=${DB_USER:-phper}
      - DB_PASSWORD=${DB_PASS:-secret}
      - APP_ENV=${APP_ENV:-local}
      - APP_KEY=${APP_KEY}
      - APP_DEBUG=${APP_KEY:-true}
      - APP_URL=${APP_URL}
      - LOGHY_API_KEY=${LOGHY_API_KEY}
      - LOGHY_SITE_CODE=${LOGHY_SITE_CODE}
mkohei commented 2 years ago

@s-takayanagi-incudata Please make Pull Request!!