programster/web-app-template

A project template to make creating webapps easier.

2.0.1 2018-12-30 15:17 UTC

This package is not auto-updated.

Last update: 2024-11-12 18:42:45 UTC


README

A template to build websites using PHP 7.2 with Ubuntu 18.04 containers. This currently uses the slim framework version 3.

Usage

# Create your project from this template using composer.
composer create-project programster/web-app-template my-project-name

# Use composer to pull the slim framework
cd Docker-Slim3-PHP-WebApp-Template/app
composer update

# Create the .env file from the template file
# be sure to review its settings and fill in appropriately.
cp .env.tmpl .env


# Build and deploy the docker container.
cd ../docker
bash build.sh
bash deploy.sh

Dev Deployment

Whilst developing your application, you can make use of the dev-deploy.sh script instead of the deploy.sh script. The difference is that your container will load your files through a volume. Thus your changes are reflected immediately and you do not have to keep rebuilding and re-deploying your docker container.

Private docker registry

Click here to find out how to deploy your own private docker registry in under a minute.

Cron Jobs

Easily add cron jobs to your container by adding lines to the docker/crons.conf file.