MMOON commited on
Commit
d6999fe
·
verified ·
1 Parent(s): 05cbbc8

Upload 20 files

Browse files
Files changed (3) hide show
  1. Dockerfile +20 -0
  2. README.md +2 -2
  3. package.json +1 -1
Dockerfile CHANGED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-alpine
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy package.json and install dependencies
6
+ COPY package.json .
7
+ # We don't have a lock file, so we just copy package.json
8
+ RUN npm install
9
+
10
+ # Copy the rest of the application code
11
+ COPY . .
12
+
13
+ # Build the application
14
+ RUN npm run build
15
+
16
+ # Expose the port the app runs on
17
+ EXPOSE 7860
18
+
19
+ # The start command from package.json will run the server
20
+ CMD ["npm", "start"]
README.md CHANGED
@@ -13,6 +13,6 @@ app_port: 7860
13
  Application versatile de gestion d'audits avec stockage local et synchronisation Google Sheets.
14
 
15
  ## Déploiement
16
- Cette application fonctionne sur Hugging Face Spaces via Docker.
17
- Le conteneur exécute `npm start`, qui compile l'application et la sert sur le port 7860.
18
  Les données sont stockées localement dans le navigateur (IndexedDB).
 
13
  Application versatile de gestion d'audits avec stockage local et synchronisation Google Sheets.
14
 
15
  ## Déploiement
16
+ Cette application est déployée sur Hugging Face Spaces à l'aide d'un `Dockerfile`.
17
+ Le `Dockerfile` s'occupe de compiler l'application (`npm run build`), puis `npm start` est utilisé pour démarrer le serveur sur le port 7860.
18
  Les données sont stockées localement dans le navigateur (IndexedDB).
package.json CHANGED
@@ -6,7 +6,7 @@
6
  "scripts": {
7
  "dev": "serve .",
8
  "build": "esbuild index.tsx --bundle --outfile=bundle.js --minify --platform=browser --format=esm --target=es2020 --loader:.tsx=tsx --loader:.ts=ts --external:react --external:react-dom --external:lucide-react --external:xlsx",
9
- "start": "npm run build && serve -s . -l 7860"
10
  },
11
  "dependencies": {
12
  "serve": "^14.2.4",
 
6
  "scripts": {
7
  "dev": "serve .",
8
  "build": "esbuild index.tsx --bundle --outfile=bundle.js --minify --platform=browser --format=esm --target=es2020 --loader:.tsx=tsx --loader:.ts=ts --external:react --external:react-dom --external:lucide-react --external:xlsx",
9
+ "start": "serve -s . -l 7860"
10
  },
11
  "dependencies": {
12
  "serve": "^14.2.4",