Skip to content

Commit 07eba22

Browse files
author
Bastian Noel
committed
Amélioration de l'autocomplétion Monaco : snippets Python/Java + suggestions de mots natifs
0 parents  commit 07eba22

29 files changed

Lines changed: 6646 additions & 0 deletions

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build & Publish Docker Image
2+
3+
on:
4+
push:
5+
branches: [ "main", "master" ]
6+
pull_request:
7+
branches: [ "main", "master" ]
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: ${{ github.repository }}
12+
13+
jobs:
14+
build-and-push:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up QEMU (multi-arch emulation)
25+
uses: docker/setup-qemu-action@v3
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Log in to GitHub Container Registry
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Extract Docker metadata (tags & labels)
38+
id: meta
39+
uses: docker/metadata-action@v5
40+
with:
41+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42+
tags: |
43+
type=ref,event=branch
44+
type=sha,prefix=sha-
45+
type=raw,value=latest,enable={{is_default_branch}}
46+
47+
- name: Build and push Docker image
48+
uses: docker/build-push-action@v5
49+
with:
50+
context: .
51+
platforms: linux/amd64,linux/arm64
52+
push: ${{ github.event_name == 'push' }}
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Dependencies
2+
node_modules/
3+
dist/
4+
temp/
5+
java-compiler/
6+
java-libs/
7+
python-runtime/
8+
jdk-*/
9+
10+
# Environment Variables
11+
.env
12+
.env.test
13+
.env.local
14+
15+
# OS generated files
16+
.DS_Store
17+
.DS_Store?
18+
._*
19+
.Spotlight-V100
20+
.Trashes
21+
ehthumbs.db
22+
Thumbs.db
23+
24+
# Logs
25+
logs
26+
*.log
27+
npm-debug.log*
28+
yarn-debug.log*
29+
yarn-error.log*
30+
31+
# Testing
32+
coverage/
33+
.nyc_output/
34+
35+
# IDEs and Editors
36+
.idea/
37+
.vscode/
38+
*.swp
39+
*.swo
40+
41+
# Builds
42+
build/
43+
out/

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Build frontend
2+
FROM node:20 AS build
3+
WORKDIR /app
4+
COPY package*.json ./
5+
RUN npm install
6+
COPY . .
7+
RUN npm run build
8+
9+
# Production Server (Node without pre-installed language runtimes)
10+
FROM node:20
11+
WORKDIR /app
12+
COPY package*.json ./
13+
14+
# Install required system tools (unzip for setup scripts)
15+
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
16+
17+
# Install standard dependencies (includes scripts requirements)
18+
RUN npm install --production
19+
20+
# Copy build and server files
21+
COPY --from=build /app/dist /app/dist
22+
COPY server /app/server
23+
COPY scripts /app/scripts
24+
25+
EXPOSE 8080
26+
ENV PORT=8080
27+
28+
# Execute the setup scripts (download-jdk, download-python, download-java-libs)
29+
# at container runtime, then start the server.
30+
CMD ["sh", "-c", "npm run setup && npm start"]

0 commit comments

Comments
 (0)