Test Environment - ChrispyPeaches/FocusFriends GitHub Wiki
Hosting
The TEST environment runs on a self-hosted machine running Portainer.
- The machine runs two Docker Stacks:
- focusapi
- porkbun-ddns
- The machine hosts a volume for the API database to have persistant storage between deployments
- 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:
- A FocusApi application instance
- 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
- A new package will be pushed to the
focusfriends/focusapi:test
Github Container Registry- Learn more about Github Container Registries
- A Github webhook will trigger a redeployment to the TEST environment
- Learn more about Github Webhooks here
- When a redeployment is triggered, the FocusApi stack will download and deploy the latest
focusfriends/focusapi:test
package