CFTunnels/frontend/Dockerfile
hitanshu310 523c9d941e Add Angular frontend with Authentik OIDC authentication
- Angular 17 with standalone components
- Angular Material + Tailwind CSS
- OIDC authorization code flow with Authentik
- Role-based access control (USER, DEVELOPER, APPROVER, ADMIN)
- Dashboard with pending requests, tunnel list, and create mapping
- Nginx reverse proxy to backend API
- Multi-container Docker Compose setup (frontend, backend, postgres)
- Environment-based configuration (local, test, prod)
2026-02-16 01:47:04 +05:30

39 lines
731 B
Docker

FROM node:20-alpine AS build
WORKDIR /app
# Copy package files
COPY package.json package-lock.json ./
# Install dependencies
RUN npm ci
# Copy source files
COPY . .
# Build arguments for OIDC config
ARG OAUTH_CLIENT_ID=cftunnels
ARG OAUTH_REDIRECT_URI=http://localhost:80/login
# Set build-time environment variables
ENV OAUTH_CLIENT_ID=$OAUTH_CLIENT_ID
ENV OAUTH_REDIRECT_URI=$OAUTH_REDIRECT_URI
# Build the application
RUN npm run build
# Production stage
FROM nginx:alpine
# Copy built files
COPY --from=build /app/dist/cftunnels-frontend/browser /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]