Skip to content

Commit

Permalink
Remove MySQL parts
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiot committed Jan 25, 2019
1 parent 7c25f70 commit c3240c0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 56 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ APP_SECRET=67d829bf61dc5f87a73fd814e2c9f629
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For a MySQL database, use: "mysql://db_user:[email protected]:3306/db_name"
# If you want to use Docker MySQL, use: "mysql://symfony-demo:symfony-demo@db:3306/symfony-demo"
# Configure your db driver and server_version in config/packages/doctrine.yaml
DATABASE_URL=sqlite:///%kernel.project_dir%/data/database.sqlite
###< doctrine/doctrine-bundle ###
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ RUN export PHP_CPPFLAGS="${PHP_CPPFLAGS} -std=c++11" \
docker-php-ext-install -j "$(nproc)" \
intl \
pdo \
# pdo_mysql \ Uncomment it to use MySQL, and remove the pdo_sqlite (see: docker-compose.yml, docker-compose.override.yml.dist)
zip \
bcmath \
; \
Expand Down
22 changes: 7 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ PHPCSFIXER?=$(EXEC) php -d memory_limit=1024m vendor/bin/php-cs-fixer

.DEFAULT_GOAL := help
.PHONY: help start stop restart install uninstall reset clear-cache tty clear clean
.PHONY: db-diff db-migrate db-rollback db-reset db-validate wait-for-db
.PHONY: db-diff db-migrate db-rollback db-fixtures db-validate
.PHONY: watch assets assets-build
.PHONY: tests lint lint-symfony lint-yaml lint-twig lint-twig php-cs php-cs-fix security-check test-schema test-all
.PHONY: tests lint lint-symfony lint-yaml lint-twig lint-xliff php-cs php-cs-fix security-check test-schema test-all
.PHONY: build up perm
.PHONY: docker-compose.override.yml

Expand Down Expand Up @@ -55,27 +55,19 @@ clean: clear
## Database
##---------------------------------------------------------------------------

wait-for-db:
$(EXEC) php -r "set_time_limit(60);for(;;){if(@fsockopen('db',3306)){break;}echo \"Waiting for MySQL\n\";sleep(1);}"

db-diff: vendor wait-for-db ## Generate a migration by comparing your current database to your mapping information
db-diff: vendor ## Generate a migration by comparing your current database to your mapping information
$(EXEC) $(CONSOLE) doctrine:migration:diff

db-migrate: vendor wait-for-db ## Migrate database schema to the latest available version
db-migrate: vendor ## Migrate database schema to the latest available version
$(EXEC) $(CONSOLE) doctrine:migration:migrate -n

db-rollback: vendor wait-for-db ## Rollback the latest executed migration
db-rollback: vendor ## Rollback the latest executed migration
$(EXEC) $(CONSOLE) doctrine:migration:migrate prev -n

db-reset: vendor wait-for-db ## Reset the database
$(EXEC) $(CONSOLE) doctrine:database:drop --force --if-exists
$(EXEC) $(CONSOLE) doctrine:database:create --if-not-exists
$(EXEC) $(CONSOLE) doctrine:migrations:migrate -n

db-fixtures: vendor wait-for-db ## Apply doctrine fixtures
db-fixtures: vendor ## Apply doctrine fixtures
$(EXEC) $(CONSOLE) doctrine:fixtures:load -n

db-validate: vendor wait-for-db ## Check the ORM mapping
db-validate: vendor ## Check the ORM mapping
$(EXEC) $(CONSOLE) doctrine:schema:validate


Expand Down
5 changes: 0 additions & 5 deletions docker-compose.override.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@ services:
nginx:
ports:
- 127.0.0.1:8080:80

# Uncomment it, if you want to use MySQL (see: Dockerfile, docker-compose.yml)
# db:
# ports:
# - 127.0.0.1:3306:3306
26 changes: 0 additions & 26 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,11 @@ services:
build:
context: .
target: app-dev
# Uncomment if you want to use MySQL (see: Dockerfile, docker-compose.override.yml)
# depends_on:
# - db
networks:
- frontend
# Uncomment if you want to use MySQL (see: Dockerfile, docker-compose.override.yml)
# - backend
volumes:
- .:/app

# Uncomment if you want to use MySQL (see: Dockerfile, docker-compose.override.yml)
# db:
# build:
# context: docker
# dockerfile: MysqlDockerfile
# environment:
# - MYSQL_ROOT_PASSWORD=symfony-demo
# - MYSQL_USER=symfony-demo
# - MYSQL_PASSWORD=symfony-demo
# - MYSQL_DATABASE=symfony-demo
# volumes:
# - db_data:/var/lib/mysql
# networks:
# - backend

# Uncomment if you want to use MySQL (see: Dockerfile, docker-compose.override.yml)
#volumes:
# db_data:
# driver: local

networks:
frontend:
# Uncomment if you want to use MySQL (see: Dockerfile, docker-compose.override.yml)
# backend:
8 changes: 0 additions & 8 deletions docker/MysqlDockerfile

This file was deleted.

0 comments on commit c3240c0

Please sign in to comment.