Checkout the repository or download the sources.
Simply run docker-compose up -d
and you are done.
Nginx will be available on localhost:80
and PostgreSQL on localhost:5432
.
docker-compose exec php composer <COMMAND>
Where cmd
is any of the available composer command.
Default connection:
docker-compose exec database psql -U postgres
Using .env file default parameters:
docker-compose exec database psql -U dbuser dbname
If you want to connect to the DB from another container (from the php
one for instance), the host will be the service name: db
.
docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
OR
docker exec -t your-db-container pg_dumpall -c -U postgres | gzip > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql.gz
Creates filename like dump_2023-12-25_09_15_26.sql
###Restore your databases
cat your_dump.sql | docker exec -i your-db-container psql -U postgres
You can execute any command on the podcasts_php
container as you would do on any docker-compose container:
docker exec php php -v
To change PHP's configuration edit .docker/php/php.ini
.
Same goes for .docker/php/xdebug.ini
.
docker-compose rm --all
docker-compose pull
docker-compose build --no-cache
docker-compose up -d --force-recreate
docker exec podcasts_php php artisan l5-swagger:generate