docker support and simplified tsconfig
This commit is contained in:
25
Dockerfile
Normal file
25
Dockerfile
Normal 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
12
docker-compose.yml
Normal 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
|
||||||
@@ -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"]
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,22 @@
|
|||||||
{
|
{
|
||||||
"files": [],
|
"compilerOptions": {
|
||||||
"references": [
|
"target": "ES2020",
|
||||||
{ "path": "./tsconfig.app.json" },
|
"useDefineForClassFields": true,
|
||||||
{ "path": "./tsconfig.node.json" }
|
"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"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
1
tsconfig.tsbuildinfo
Normal 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"}
|
||||||
@@ -6,6 +6,10 @@ import path from 'path';
|
|||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react(), ViteYaml()],
|
plugins: [react(), ViteYaml()],
|
||||||
|
server: {
|
||||||
|
port: 3000,
|
||||||
|
host: '0.0.0.0',
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'~': path.resolve(__dirname, './src/'),
|
'~': path.resolve(__dirname, './src/'),
|
||||||
|
|||||||
Reference in New Issue
Block a user