docker support and simplified tsconfig

This commit is contained in:
2025-02-09 18:45:41 +02:00
parent 3fedd1e7a5
commit 23e20a7b14
7 changed files with 62 additions and 62 deletions

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM node:20-alpine
ARG VITE_OPEN_WEATHER_KEY
ARG VITE_OPEN_WEATHER_LAT
ARG VITE_OPEN_WEATHER_LON
ARG VITE_UNSPLASH_ACCESS_KEY
ENV VITE_OPEN_WEATHER_KEY=$VITE_OPEN_WEATHER_KEY
ENV VITE_OPEN_WEATHER_LAT=$VITE_OPEN_WEATHER_LAT
ENV VITE_OPEN_WEATHER_LON=$VITE_OPEN_WEATHER_LON
ENV VITE_UNSPLASH_ACCESS_KEY=$VITE_UNSPLASH_ACCESS_KEY
WORKDIR /app
COPY package*.json .
RUN npm install
COPY public ./public
COPY src ./src
COPY index.html .
COPY tsconfig.json .
COPY postcss.config.cjs .
COPY vite.config.ts .
CMD ["npm", "run", "dev"]
EXPOSE 3000

12
docker-compose.yml Normal file
View File

@@ -0,0 +1,12 @@
services:
vertex:
build:
context: .
container_name: vertex
ports:
- "3003:3000"
volumes:
- ./data:/app/data/
env_file:
- .env
restart: unless-stopped

View File

@@ -1,33 +0,0 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"baseUrl": ".",
"paths": {
"~/*": ["src/*"],
},
"types": [
"@modyfi/vite-plugin-yaml/modules"
]
},
"include": ["src"]
}

View File

@@ -1,7 +1,22 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"jsx": "react-jsx",
"moduleResolution": "bundler",
"skipLibCheck": true,
"isolatedModules": true,
"noEmit": true,
"strict": true,
"baseUrl": ".",
"paths": {
"~/*": ["src/*"],
},
"types": [
"@modyfi/vite-plugin-yaml/modules"
]
},
"include": ["src"]
}

View File

@@ -1,24 +0,0 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
},
"include": ["vite.config.ts"]
}

1
tsconfig.tsbuildinfo Normal file
View File

@@ -0,0 +1 @@
{"root":["./src/app.tsx","./src/atoms.ts","./src/config.ts","./src/main.tsx","./src/types.ts","./src/vite-env.d.ts","./src/api/get-app-icon.ts","./src/api/get-apps.ts","./src/api/get-search-providers.ts","./src/api/open-weather.ts","./src/api/unsplash.ts","./src/components/apps/app-button.tsx","./src/components/apps/app-list.tsx","./src/components/ui/background.tsx","./src/components/ui/sidebar.tsx","./src/components/widgets/current-image-widget.tsx","./src/components/widgets/date-widget.tsx","./src/components/widgets/favorite-background.tsx","./src/components/widgets/search-widget.tsx","./src/components/widgets/settings.tsx","./src/components/widgets/weather-widget.tsx","./src/lib/array.ts","./src/lib/date.ts","./src/lib/load-image.ts","./src/lib/math.ts","./src/lib/use-active-category.ts","./src/pages/index-page.tsx"],"version":"5.7.3"}

View File

@@ -6,6 +6,10 @@ import path from 'path';
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), ViteYaml()],
server: {
port: 3000,
host: '0.0.0.0',
},
resolve: {
alias: {
'~': path.resolve(__dirname, './src/'),