Skip to content

sanbricio/go-gallery-front

Repository files navigation

Go Gallery Frontend

Frontend for the Go Gallery application, built with Angular.


🚀 Features

  • Angular 19
  • Dynamic runtime configuration (env.json)
  • Docker-ready with environment variable injection
  • Integrated with the backend: Go Gallery API

⚙️ Configurable Environment Variables

Used only in Docker (production). Not needed during development with npm run start.

Example .env:

API_URL=http://localhost:3000/api
WITH_CREDENTIALS=true

These are injected at runtime using a generated env.json file.


🔧 Local Development

To run the frontend locally:

  1. Clone this repository.

  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run start
  4. Visit http://localhost:4200.

Backend Required:
The frontend depends on the backend running locally.


📦 Production Build

To generate a production build:

npm run build -- --configuration production

The output will be in: dist/go-gallery-front/browser


🐳 Docker Deployment

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:latest

App will be available at: http://localhost


📄 Runtime Configuration (env.json)

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.


✅ Notes

  • In development (npm run start), no env.json is needed.
  • In production (docker run), env.json is generated dynamically from .env.

✨ Contributing

Pull requests and feedback are welcome!

Developed by @sanbricio

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages