Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Application Setup

Brian Webb edited this page Mar 2, 2022 · 3 revisions

Docker

The application can be booted for development and production using Docker. The included docker-compose.yml file is intended for development where the docker-compose-prod.yml file is intended for deployment. The main difference being the certbot container for managing SSL.

To get started after having Docker and Docker Compose installed simply run docker-compose up in the project root directory.

Configure the Gotify database

The docker configuration and initialization scripts don't currently create the database needed for Gotify. The included Docker and Gotify configuration assumes the use of the same host, username and password for the Gotify DB as the application's DB with the database named gotify. You simply need to create the gotify database on the same host and ensure the application's database user has access.

Migrate the DB

Once the Docker containers are up and running you'll need to migrate the database using php artisan migrate which likely will need to be ran from within your app docker container. If you haven't altered the docker config you could run that command in the project root through the app docker container with the command:

docker exec -it $(docker ps --filter name=app | grep -v CONTAINER | awk '{print $1}') php artisan migrate

Get a pusher account & set env vars

In order for real time UI updates to work you'll need a Pusher account which can be created for free. Once setup you'll need to create credentials for each environment you'll be using and set them in the .env file under the keys:

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=

Setup SSL certificates w/ LetsEncrypt

If you are running in production you'll want to setup an SSL certificate for the domain or subdomain you are running the application under. This can easily be done using LetsEncrypt with the included certbot container. The domain you will be using needs to be set in the APP_DOMAIN environment variable in the .env file for all the nginx configuration to work correctly.

To manually register the SSL certificates you can run the command below on your server in the project root (substitute your domain for example.org):

docker-compose run --rm  certbot certonly --webroot --webroot-path /var/www/certbot/ -d example.org

Enable registration, register in web app, disable again

By default the application code doesn't allow web based new account signups since you may not want random folks on the internet creating accounts on your application instance. This means you too won't be able to create your own account.

To get around this temporarily open the file config/fortify.php and uncomment the Features::registration() line in the lower features array, then save the file. Now you may complete your own web based registration. Once complete you may comment the line out again and save the file.

Application Setup

You are now ready to configure the application to handle your phone numbers, messages, voicemails etc. This requires the setup of additional resources through your VOIP provider. This information can be found here