Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Dépendances
node_modules
.pnpm-store

# Fichiers de build
dist
build

# Environnement
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Fichiers d'éditeur
.idea
.vscode
*.swp
*.swo

# Fichiers système
.DS_Store
Thumbs.db

# Logs
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
logs
*.log

# Cache
.astro
.eslintcache
.cache

# Tests
coverage
.nyc_output

# Fichiers Docker (pour éviter la récursion)
Dockerfile
.dockerignore
docker-compose*

# Fichiers Git
.git
.gitignore
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:20-alpine AS build

RUN corepack enable && corepack prepare [email protected] --activate

WORKDIR /app

COPY pnpm-lock.yaml package.json ./

RUN pnpm install --frozen-lockfile

COPY . .

RUN pnpm build

FROM nginx:1.28.0-alpine3.21-slim AS runtime

COPY ./nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/dist /usr/share/nginx/html

EXPOSE 8080
31 changes: 31 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
worker_processes 1;

events {
worker_connections 1024;
}

http {
server {
listen 8080;
server_name _;

root /usr/share/nginx/html;
index index.html index.htm;
include /etc/nginx/mime.types;

gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;

error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
internal;
}

location / {
try_files $uri $uri/index.html =404;
}
}
}