Skip to content
Snippets Groups Projects
Commit a3bdcb08 authored by thibault.capt's avatar thibault.capt
Browse files

(feat): v1 presentation

parent 0c765e1f
No related branches found
No related tags found
No related merge requests found
File added
# Node.js dependencies
node_modules/
# Build outputs
dist/
build/
out/
# IDE and editor files
.idea/
.vscode/
*.swp
*.swo
# Logs and temporary files
*.log
tmp/
temp/
*.tmp
# Version control
.git/
.gitignore
# Environment and secrets
.env*
*.env
*.pem
*.key
*.crt
# Documentation
*.md
README*
# Docker files
Dockerfile*
docker-compose*
# Cache and development artifacts
.angular/cache/
# Project-specific patterns
public/
# Exclude specific files
!.nvmrc
!.prettierignore
!.prettierrc
!.editorconfig
# Exclude source files
src/**/*.ts
src/**/*.html
src/**/*.scss
\ No newline at end of file
# syntax=docker/dockerfile:1
# Define build arguments for Node.js and pnpm versions
ARG NODE_VERSION=20.11.1
ARG PNPM_VERSION=10.4.1
# Base image for development and building
FROM node:${NODE_VERSION} AS base
# Update Corepack and enable pnpm
RUN npm install --global corepack@latest && corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate
# Set working directory
WORKDIR /app
# Builder stage for compiling the Angular application
FROM base AS builder
# Copy package manager files
COPY package.json pnpm-lock.yaml ./
# Install dependencies with pnpm
RUN --mount=type=cache,target=/root/.pnpm-store pnpm install --frozen-lockfile
# Copy application source code
COPY . ./
# Build the Angular application
RUN pnpm run build
# Production stage with a minimal image
FROM node:${NODE_VERSION}-slim AS final
# Update Corepack and enable pnpm
RUN npm install --global corepack@latest && corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate
# Set working directory
WORKDIR /app
# Copy built application and necessary files from builder stage
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json ./
COPY --from=builder /app/node_modules ./node_modules
# Set environment to production
ENV NODE_ENV=production
# Expose the default Angular port
EXPOSE 4200
# Start the Angular application
CMD ["npx", "http-server", "dist"]
\ No newline at end of file
# Frontend
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.4.
## Development server
To start a local development server, run:
```bash
ng serve
```
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
## Code scaffolding
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
```bash
ng generate component component-name
```
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
```bash
ng generate --help
```
## Building
To build the project run:
```bash
ng build
```
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
## Running unit tests
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
```bash
ng test
```
## Running end-to-end tests
For end-to-end (e2e) testing, run:
```bash
ng e2e
```
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
## Additional Resources
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
services:
frontend:
build:
context: ./
ports:
- "4200:4200"
restart: unless-stopped
init: true
# env_file: ./.env # Uncomment if .env file exists
depends_on:
- database
database:
image: postgres:latest
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
volumes:
- db_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
db_data:
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment