Dockerfile cleanup for .env setup
This commit is contained in:
1 parent
3adf8b67be
commit
a72de5105a
2 files changed
+1
-2
No files matched your search
@@ -28,7 +28,6 @@ COPY . /var/www/html/
|
||||
RUN composer install --no-dev --optimize-autoloader --no-interaction --prefer-dist \
|
||||
&& mkdir -p logs \
|
||||
&& chmod 755 logs \
|
||||
&& if [ ! -f .env ]; then cp .env.example .env; fi \
|
||||
&& chown -R www-data:www-data /var/www/html
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
@@ -219,7 +219,7 @@ docker run --rm -p 8080:8080 --name password-generator password-generator:latest
|
||||
|
||||
### Docker Compose (project-local setup)
|
||||
|
||||
The repository ships a compose template rather than a committed local override. Copy it to a host-specific file before running locally.
|
||||
The repository ships a compose template rather than a committed local override. Copy it to a host-specific file before running locally. Keep the app runtime configuration on the host (for example `.env` and `config/config.json`) and let Compose mount those values into the container; the image itself must not create or overwrite them.
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
|
||||
Reference in new issue
Block a user