Skip to content
Open
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
7 changes: 0 additions & 7 deletions Caddyfile

This file was deleted.

5 changes: 3 additions & 2 deletions apps/OpenSign/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@reduxjs/toolkit": "^2.8.2",
"axios": "^1.10.0",
"date-fns-tz": "^3.2.0",
"env-cmd": "",
"file-saver": "^2.0.5",
"i18next": "^25.3.0",
"i18next-browser-languagedetector": "^8.2.0",
Expand Down Expand Up @@ -57,7 +58,7 @@
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
},
"scripts": {
"build": "npm run version && NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
"build": "npm run version && NODE_OPTIONS=\"--max-old-space-size=8192\" env-cmd -f .env vite build",
"start-dev": "vite",
"dev": "vite",
"preview": "vite preview",
Expand Down Expand Up @@ -130,4 +131,4 @@
"engines": {
"node": "18 || 20 || 22"
}
}
}
10 changes: 8 additions & 2 deletions apps/OpenSign/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig, splitVendorChunkPlugin } from "vite";
import { defineConfig, splitVendorChunkPlugin, searchForWorkspaceRoot } from "vite";
import react from "@vitejs/plugin-react";
import svgr from "vite-plugin-svgr";
import { resolve } from "path";
Expand Down Expand Up @@ -41,7 +41,13 @@ export default defineConfig(({ command, mode }) => {
}
},
server: {
port: process.env.PORT || 3000, // Same port as CRA
fs: {
allow: [
searchForWorkspaceRoot(process.cwd()),
'/opt/opensign',
],
},
port: process.env.PORT || 3000, // Same port as CRA
open: true
},
test: {
Expand Down
22 changes: 2 additions & 20 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ services:
env_file: .env.prod
environment:
- NODE_ENV=production
- SERVER_URL=${HOST_URL:-https://localhost:3001}/api/app
- PUBLIC_URL=${HOST_URL:-https://localhost:3001}
- SERVER_URL=${HOST_URL:?err}/api/app
- PUBLIC_URL=${HOST_URL:?err}
networks:
- app-network
mongo:
Expand All @@ -34,29 +34,11 @@ services:
- "3000:3000"
networks:
- app-network
caddy:
image: caddy:latest
container_name: caddy-container
ports:
- "3001:3001"
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- app-network
environment:
- HOST_URL=${HOST_URL:-localhost:3001}
networks:
app-network:
driver: bridge

volumes:
data-volume:
web-root:
caddy_data:
caddy_config:
opensign-files: