Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .docker/wait_for_postgres.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
set -e

echo ">> Waiting for PostgreSQL to start"
WAIT=0
while ! nc -z postgres 5432; do
sleep 1
echo " PostgreSQL not ready yet"
WAIT=$(($WAIT + 1))
if [ "$WAIT" -gt 20 ]; then
echo "Error: Timeout when waiting for postgres socket"
exit 1
fi
done

echo ">> PostgreSQL socket available, resuming command execution"

"$@"
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ MAILER_URL=null://localhost
###> doctrine/doctrine-bundle ###
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# For PostgreSQL database, use: "postgres://dev:dev@postgres:5432/todo?sslmode=disable"
# Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls
DATABASE_URL="mysql://dev@mysql:3306/todo?charset=utf8mb4&password=dev"
###< doctrine/doctrine-bundle ###
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :docker_compose, yml: "/vagrant/docker-compose.yml", rebuild: false, run: "always"
config.vm.provision "shell", inline: "cd /vagrant && docker run --rm --volume $(pwd):/app prooph/composer:7.1 install -o --prefer-dist"
config.vm.provision "shell", inline: "cd /vagrant && docker-compose run --rm php php bin/console event-store:event-stream:create"
config.vm.provision "shell", inline: "cd /vagrant && docker-compose run --rm php php bin/console doctrine:migrations:migrate"
end
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"php": "^7.1",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"doctrine/doctrine-migrations-bundle": "^2.0",
"prooph/event-sourcing": "^5.2",
"prooph/event-store-bus-bridge": "^3.0",
"prooph/event-store-http-middleware": "^0.2.0",
Expand All @@ -58,7 +59,7 @@
"symfony/framework-bundle": "^4.0",
"symfony/monolog-bundle": "^3.1",
"symfony/psr-http-message-bridge": "^1.0",
"symfony/swiftmailer-bundle": "^3.1",
"symfony/swiftmailer-bundle": "^3.2",
"symfony/templating": "^4.0",
"symfony/twig-bundle": "^4.0",
"symfony/yaml": "^4.0",
Expand Down
Loading