Test Environment - ChrispyPeaches/FocusFriends GitHub Wiki

Hosting

The TEST environment runs on a self-hosted machine running Portainer.

  • The machine runs two Docker Stacks:
    1. focusapi
    2. porkbun-ddns
  • The machine hosts a volume for the API database to have persistant storage between deployments
    1. focusapidb_data

FocusApi

The FocusApi stack uses the docker-compose.yml file in the FocusFriends repo's base folder to construct a stack of containers. The containers are:

  1. A FocusApi application instance
  2. A SQL Server instance

Porkbun-ddns

A service that periodically updates the TEST environment domain's DNS records to register the correct address for routing to the hosted environment.

The linked repo's docker-compose.yml file was used to create a Stack on the TEST Portainer server.

Continuous Deployment Flow

When a commit is pushed to the test branch

  1. A new package will be pushed to the focusfriends/focusapi:test Github Container Registry
  2. A Github webhook will trigger a redeployment to the TEST environment
  3. When a redeployment is triggered, the FocusApi stack will download and deploy the latest focusfriends/focusapi:test package