Local Development Setup (Docker)
This guide walks through setting up the DeltaFM API locally using Docker, from cloning the repository to running the API container. It assumes no prior setup.
1. Prerequisites
Install the following:
- Git
- Docker Desktop (Mac/Windows) or Docker Engine (Linux)
- (Optional) Visual Studio or Rider for backend development
Verify installation:
docker --version
git --version
2. Clone the Repository
git clone https://github.com/MaintFM/MaintFMAPI.git
cd MaintFMAPI
3. Authenticate with GHCR (GitHub Container Registry)
Create a Personal Access Token (PAT)
- Go to GitHub → Settings → Developer Settings → Personal Access Tokens
- Create a new token (classic or fine-grained)
- Required permissions:
read:packagesrepo(if private repo)
Login to GHCR
echo YOUR_PAT | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
4. Environment Configuration
Create a Docker environment file:
cp .env.docker.example .env.docker
Edit .env.docker:
ASPNETCORE_URLS=http://+:5216
ASPNETCORE_ENVIRONMENT=Development
NEW_RELIC_LICENSE_KEY=eu01xxf83e4f21b139f1114b563e9f31FFFFNRAL
DB_CONNECTION_STRING=Server=db;Port=5432;Database=swanmaint;Username=swanuser;Password=swanpass;Include Error Detail=True;
GOOGLE_MAPS_KEY=AIzaSyDEVjAILN6_txbRiIS2Wp08A-oDymyzSaI
AUTH0_DOMAIN=dev-26fggb7lx5n3zdtg.eu.auth0.com
AUTH0_AUDIENCE=https://api.ballycommane.eu
AUTH0_MGMTCLIENTID=fmCBSuFng1SI7vQLDjNnFbjndlihyKei
AUTHO_MGMTCLIENTSECRET=FFfdI8FcZVCDWNgHCIJGAS2CVMeTxAX9sLK6o3sB7wm45aKnDInUMOf1GtYqSmhc
5. Start docker stack (API + DB )
Run database and Redis:
docker compose up -d
API will be available at:
http://localhost:5216
6. Stopping Containers
docker compose down
7. Updating
The compose file is set to always pull the latest container. so just
docker compose down
docker compose up -d
will update the image to the latest version
10. Notes
- Use
.env.dockerfor containers - Do not commit secrets
- Backend devs can run API locally instead of Docker if preferred
Setup complete.