-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variable not found: "DATABASE_URL #182
Comments
Having the same problem, although I am running ppm inside a Docker container and symfony 6.1. Command: When running the same command from a local console, symfony parses the .env (or .env.local.php) file correctly and the env vars are listed in webprofiler (in Server Params). When running in docker, the webprofiler shows "no data". I have to pass all variables as docker environment variables in docker-compose file. composer.json for ppm: Dockerfile: ENV OPCACHE_ENABLE="On" ENV STATIC_DIR="public" RUN apk add RUN docker-php-ext-configure intl COPY build/php/config/* /usr/local/etc/php/conf.d/ RUN mkdir -p /ppm COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer WORKDIR /ppm RUN composer install RUN mkdir -p /var/www WORKDIR /var/www CMD /ppm/vendor/bin/ppm start EXPOSE 8080` |
The problem is related to how .env files are parsed in symfony: |
I created a pull request for this bug: #186 |
I recommand to include your env file into the docker-compose service like described here: |
When I run php pm with test environment
vendor/bin/ppm start --config=ppm.json --app-env=test
I got following exception:
My .env.test file:
Do I start ppm server properly? I use symfony 5.2
The text was updated successfully, but these errors were encountered: