Skip to content

Commit a1a4341

Browse files
Merge pull request #114 from alexandrechevalierCBH/configuration
Configuration - Transport
2 parents 301175f + e3e5ee2 commit a1a4341

File tree

4 files changed

+47
-46
lines changed

4 files changed

+47
-46
lines changed

.env.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ MYSQL_VERSION=8.0.27
77
MYSQL_DATABASE=databasorus
88
MYSQL_USER=user
99
MYSQL_PASSWORD=password
10+
MAILER_DSN=smtp://mailhog:1025

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
###< phpunit/phpunit ###
2020

2121
.env
22-
docker-compose.override.yml
22+
docker compose.override.yml

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
.PHONY: start
22
start: cp-env build install-deps
3-
docker-compose up -d
3+
docker compose up -d
44

55
.PHONY: cp-env
66
cp-env:
77
@cp -n .env.dist .env || true
88

99
.PHONY: build
1010
build:
11-
docker-compose build
11+
docker compose build
1212

1313
.PHONY: install-deps
1414
install-deps:
15-
docker-compose run --rm php composer install
15+
docker compose run --rm php composer install
1616

1717
.PHONY: database-migrate
1818
database-migrate:
19-
docker-compose run --rm php bin/console doctrine:migrations:migrate
19+
docker compose run --rm php bin/console doctrine:migrations:migrate
2020

2121
.PHONY: database-create
2222
database-create:
23-
docker-compose run --rm php bin/console doctrine:database:create
23+
docker compose run --rm php bin/console doctrine:database:create
2424

2525
.PHONY: database-drop
2626
database-drop:
27-
docker-compose run --rm php bin/console doctrine:database:drop --if-exists --force
27+
docker compose run --rm php bin/console doctrine:database:drop --if-exists --force
2828

2929
.PHONY: fixtures-load
3030
fixtures-load:
31-
docker-compose run --rm php bin/console doctrine:fixtures:load
31+
docker compose run --rm php bin/console doctrine:fixtures:load
3232

3333
.PHONY: reset-db
3434
reset-db: database-drop database-create database-migrate fixtures-load

docker-compose.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
---
2-
version: '3'
2+
version: "3"
33

44
services:
5-
php:
6-
platform: linux/x86_64
7-
build:
8-
context: .
9-
dockerfile: Dockerfile
10-
env_file: .env
11-
volumes:
12-
- '.:/usr/src/app'
13-
restart: unless-stopped
5+
php:
6+
platform: linux/x86_64
7+
build:
8+
context: .
9+
dockerfile: Dockerfile
10+
env_file: .env
11+
volumes:
12+
- ".:/usr/src/app"
13+
restart: unless-stopped
1414

15-
nginx:
16-
platform: linux/x86_64
17-
image: nginx:1.21.3-alpine
18-
ports:
19-
- 80:80
20-
volumes:
21-
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
22-
- ./public:/usr/src/app/public
23-
restart: unless-stopped
15+
nginx:
16+
platform: linux/x86_64
17+
image: nginx:1.21.3-alpine
18+
ports:
19+
- 80:80
20+
volumes:
21+
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
22+
- ./public:/usr/src/app/public
23+
restart: unless-stopped
2424

25-
# phpmyadmin:
26-
# platform: linux/x86_64
27-
# image: phpmyadmin
28-
# environment:
29-
# - PMA_ARBITRARY=1
30-
# ports:
31-
# - 8080:80
32-
# restart: unless-stopped
25+
phpmyadmin:
26+
platform: linux/x86_64
27+
image: phpmyadmin
28+
environment:
29+
- PMA_ARBITRARY=1
30+
ports:
31+
- 8080:80
32+
restart: unless-stopped
3333

34-
database:
35-
image: mysql:8.0.27
36-
environment:
37-
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
38-
MYSQL_DATABASE: ${MYSQL_DATABASE}
39-
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
40-
MYSQL_USER: ${MYSQL_USER}
41-
volumes:
42-
- db-data:/var/lib/mysql:rw
43-
restart: unless-stopped
34+
database:
35+
image: mysql:8.0.27
36+
environment:
37+
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
38+
MYSQL_DATABASE: ${MYSQL_DATABASE}
39+
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
40+
MYSQL_USER: ${MYSQL_USER}
41+
volumes:
42+
- db-data:/var/lib/mysql:rw
43+
restart: unless-stopped
4444

4545
volumes:
46-
db-data: ~
46+
db-data: ~

0 commit comments

Comments
 (0)