Frontend for the Go Gallery application, built with Angular.
- Angular 19
- Dynamic runtime configuration (
env.json) - Docker-ready with environment variable injection
- Integrated with the backend: Go Gallery API
Used only in Docker (production). Not needed during development with npm run start.
Example .env:
API_URL=http://localhost:3000/api
WITH_CREDENTIALS=trueThese are injected at runtime using a generated env.json file.
To run the frontend locally:
-
Clone this repository.
-
Install dependencies:
npm install
-
Start the development server:
npm run start
-
Visit http://localhost:4200.
Backend Required:
The frontend depends on the backend running locally.
- Backend repo: Go Gallery Backend
- Start backend at: http://localhost:3000/api
To generate a production build:
npm run build -- --configuration productionThe output will be in: dist/go-gallery-front/browser
Build Docker image:
docker build -t go-gallery-front:latest .Or tag with version:
docker build -t go-gallery-front:v1.0.0 .Run Docker container:
docker run --env-file .env -p 80:80 go-gallery-front:latestApp will be available at: http://localhost
This file is generated automatically in Docker runtime from .env:
{
"apiUrl": "https://go-gallery/api",
"withCredentials": "true"
}This is handled via entrypoint.sh using envsubst.
- In development (
npm run start), noenv.jsonis needed. - In production (
docker run),env.jsonis generated dynamically from.env.
Pull requests and feedback are welcome!
Developed by @sanbricio