Skip to content

Commit fa637b5

Browse files
committed
Docker: Move .env.dist to .docker
1 parent 8d6620a commit fa637b5

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.env.dist renamed to .docker/compose/docker.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ DB_PORT=3306
1111
DB_NAME=demo
1212
DB_USER=local
1313
DB_PASS=local
14-
TIMEZONE=Europe/Paris
14+
TIMEZONE=Europe/Paris

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project/
22
!project/.gitkeep
33
.env
4-
!.env.dist
4+
!.docker/compose/.env.dist
55
docker-compose.override.yml
66
dump_*.sql

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ help:
2828
sf: ## Symfony Command, example: `sf CMD="debug:router"`
2929
@$(CONSOLE) $(CMD)
3030

31-
up: docker-compose.override.yml up-ci ## Start project with docker-compose + Dev env
31+
up: conf-env-file up-ci ## Start project with docker-compose + Dev env
3232

3333
stop: ## Stop docker containers
3434
@$(DOCKER_COMPOSE) stop
@@ -39,7 +39,7 @@ refresh: ## Remove and re-create docker containers (WITHOUT delete all data)
3939

4040
restart: stop up-ci ## Restart docker containers
4141

42-
install: docker-compose.override.yml build up ## Create and start docker containers
42+
install: conf-env-file build up ## Create and start docker containers
4343

4444
install-demo:
4545
@$(EXEC_ROOT) chmod -R 775 /var/www
@@ -207,9 +207,9 @@ define echo_text
207207
echo -e '\e[1;$(2)m$(1)\e[0m'
208208
endef
209209

210-
docker-compose.override.yml:
210+
conf-env-file:
211211
ifeq (,$(wildcard .env))
212-
@cp .env.dist .env
212+
@cp .docker/compose/docker.env .env
213213
endif
214214

215215
#docker-compose.override.yml: docker-compose.$(DOCKER_COMPOSE_OVERRIDE).yml

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ A Docker image based on Ubuntu, serving PHP 8.1 FPM running as Nginx Module. Use
1212
Before use the docker version, check that ports 80/8080/443 are available. If an Apache / Nginx local server, another docker container are active, they can block access to these ports.
1313

1414
```shell script
15+
# [Optional] Before launch install, you can edit the docker .env
16+
make conf-env-file
17+
# edit .env
18+
1519
make install
1620

1721
# If symfony project is present on project folder

0 commit comments

Comments
 (0)