diff --git a/.env.dist b/.env.dist index eeafa62..8096a7d 100644 --- a/.env.dist +++ b/.env.dist @@ -7,3 +7,4 @@ MYSQL_VERSION=8.0.27 MYSQL_DATABASE=databasorus MYSQL_USER=user MYSQL_PASSWORD=password +MAILER_DSN=smtp://mailhog:1025 \ No newline at end of file diff --git a/.gitignore b/.gitignore index ba40174..53b81cd 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,4 @@ ###< phpunit/phpunit ### .env -docker-compose.override.yml +docker compose.override.yml diff --git a/Makefile b/Makefile index c6dc7e1..0ef82db 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: start start: cp-env build install-deps - docker-compose up -d + docker compose up -d .PHONY: cp-env cp-env: @@ -8,27 +8,27 @@ cp-env: .PHONY: build build: - docker-compose build + docker compose build .PHONY: install-deps install-deps: - docker-compose run --rm php composer install + docker compose run --rm php composer install .PHONY: database-migrate database-migrate: - docker-compose run --rm php bin/console doctrine:migrations:migrate + docker compose run --rm php bin/console doctrine:migrations:migrate .PHONY: database-create database-create: - docker-compose run --rm php bin/console doctrine:database:create + docker compose run --rm php bin/console doctrine:database:create .PHONY: database-drop database-drop: - docker-compose run --rm php bin/console doctrine:database:drop --if-exists --force + docker compose run --rm php bin/console doctrine:database:drop --if-exists --force .PHONY: fixtures-load fixtures-load: - docker-compose run --rm php bin/console doctrine:fixtures:load + docker compose run --rm php bin/console doctrine:fixtures:load .PHONY: reset-db reset-db: database-drop database-create database-migrate fixtures-load diff --git a/docker-compose.yml b/docker-compose.yml index bddc57e..6f9f8ba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,46 +1,46 @@ --- -version: '3' +version: "3" services: - php: - platform: linux/x86_64 - build: - context: . - dockerfile: Dockerfile - env_file: .env - volumes: - - '.:/usr/src/app' - restart: unless-stopped + php: + platform: linux/x86_64 + build: + context: . + dockerfile: Dockerfile + env_file: .env + volumes: + - ".:/usr/src/app" + restart: unless-stopped - nginx: - platform: linux/x86_64 - image: nginx:1.21.3-alpine - ports: - - 80:80 - volumes: - - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro - - ./public:/usr/src/app/public - restart: unless-stopped + nginx: + platform: linux/x86_64 + image: nginx:1.21.3-alpine + ports: + - 80:80 + volumes: + - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro + - ./public:/usr/src/app/public + restart: unless-stopped -# phpmyadmin: -# platform: linux/x86_64 -# image: phpmyadmin -# environment: -# - PMA_ARBITRARY=1 -# ports: -# - 8080:80 -# restart: unless-stopped + phpmyadmin: + platform: linux/x86_64 + image: phpmyadmin + environment: + - PMA_ARBITRARY=1 + ports: + - 8080:80 + restart: unless-stopped - database: - image: mysql:8.0.27 - environment: - MYSQL_RANDOM_ROOT_PASSWORD: "yes" - MYSQL_DATABASE: ${MYSQL_DATABASE} - MYSQL_PASSWORD: ${MYSQL_PASSWORD} - MYSQL_USER: ${MYSQL_USER} - volumes: - - db-data:/var/lib/mysql:rw - restart: unless-stopped + database: + image: mysql:8.0.27 + environment: + MYSQL_RANDOM_ROOT_PASSWORD: "yes" + MYSQL_DATABASE: ${MYSQL_DATABASE} + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + MYSQL_USER: ${MYSQL_USER} + volumes: + - db-data:/var/lib/mysql:rw + restart: unless-stopped volumes: - db-data: ~ + db-data: ~