Docker Compose configuration for SurvLoop ^0.1 running PHP 7.3 with Nginx, PHP-FPM, PostgreSQL 11.2 and Composer.
This package is auto-updated.
Last update: 2020-03-13 15:05:54 UTC
d# docker-survloop Docker Compose configuration for SurvLoop ^0.1 running PHP 7.3 with Nginx, PHP-FPM, PostgreSQL 11.2 and Composer.
Docker Compose configuration for SurvLoop ^0.1 running PHP 7.3 with Nginx, PHP-FPM, PostgreSQL 11.2 and Composer. It exposes 4 services:
- web (Nginx)
- php (PHP 7.3 with PHP-FPM)
- db (PostgreSQL 11.2)
The PHP image comes with the most commonly used extensions and is configured with xdebug. The UUID extension for PostgreSQL has been added. Nginx default configuration is set up for Symfony 4 and serves the working directory. Composer is run at boot time and will automatically install the vendors.
Thank you to https://github.com/ineat/docker-php-nginx-postgres-composer for getting me started in the Docker world.
You will need:
This process runs a variety of Digital Ocean's layered tutorials. I don't understand all of it yet, so will leave the explanations to their superb articles. This variation uses PostgresSQL instead of MYSQL, and it also adds SurvLoop stuff. You should be able to accept the defaults.
After starting up a new Ubuntu 18.04 Droplet, connect it with the root account and your SSH key. The first install script will create a non-root user, e.g. survuser. Be sure to create and save a copy of a strong password, which you'll need handy throughout this install:
$ git clone https://github.com/wikiworldorder/docker-survloop.git /usr/local/lib/docker-survloop $ chmod +x /usr/local/lib/docker-survloop/bin/*.sh $ /usr/local/lib/docker-survloop/bin/survloop-install-1.sh survuser
Then exit to logout as root, and log back in as survuser. Your key should work, and you should have sudo power.
$ exit # ssh survuser@YOUR.SERVER.IP
$ sudo chmod +x /usr/local/lib/docker-survloop/bin/*.sh $ bash /usr/local/lib/docker-survloop/bin/survloop-install-2.sh $ cd ~/survloop $ docker run --rm -v $(pwd):/app composer install $ docker-compose up -d $ docker-compose exec app nano .env
Update the .env file for your system with a database password you can create now...
Add on SurvLoop package...
$ bash /usr/local/lib/docker-survloop/bin/survloop-install-3.sh
Checkout the repository or download the sources.
docker-compose up and you are done.
Nginx will be available on
localhost:80 and PostgreSQL on
To change PHP's configuration edit
Same goes for
You can add any .ini file in this directory, don't forget to map them by adding a new line in the php's
volume section of the
Any .sh or .sql file you add in
./.docker/conf/postgres will be automatically loaded at boot time.
If you want to change the db name, db user and db password simply edit the
.env file at the project's root.
If you connect to PostgreSQL from localhost a password is not required however from another container you will have to supply it.