Skip to content

Commit

Permalink
fix(ci): update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Sep 13, 2024
1 parent 508eb94 commit 977fc39
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY package*.json ./
RUN npm ci --silent
COPY . .
RUN npm run build
EXPOSE 5173
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["node", "dist/main.js"]

FROM nginx:stable
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 5173
15 changes: 0 additions & 15 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
server {
listen 5173;
resolver 8.8.8.8;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
location ~ ^/api/(.*)$ {
proxy_pass https://scanr-api.dataesr.ovh/$1$is_args$args;
proxy_set_header Authorization 'Basic $VITE_SCANR_API_AUTHORIZATION';
proxy_set_header Accept application/json;
proxy_set_header Content-Type application/json;
client_max_body_size 10M;
}
location /email/ {
proxy_set_header accept application/json;
proxy_set_header api-key $VITE_BREVO_API_AUTHORIZATION;
proxy_set_header content-type application/json;
proxy_ssl_server_name on;
proxy_pass https://api.brevo.com/v3/smtp/email;
}
}
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
Expand All @@ -18,7 +20,8 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"],
"include": ["src/**/*"],
"exclude": ["node_modules"],
"references": [
{
"path": "./tsconfig.node.json"
Expand Down
10 changes: 9 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
plugins: [react()],
build: {
outDir: "dist",
rollupOptions: {
input: {
main: "./src/main.tsx",
},
},
},
});

0 comments on commit 977fc39

Please sign in to comment.