Compare commits

...

2 Commits

Author SHA1 Message Date
20defc5b0f alpine + env 2023-09-16 20:55:14 +02:00
dcdb24c591 Revert "cleanup conf"
This reverts commit e499c5aee2.
2023-09-16 20:44:58 +02:00
3 changed files with 40 additions and 32 deletions

1
.gitignore vendored
View File

@@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
docker-compose.yml
# Editor directories and files
.vscode/*

View File

@@ -5,6 +5,6 @@ RUN npm ci
COPY . ./
RUN npm run build
FROM nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf.template /etc/nginx/templates/default.conf.template

View File

@@ -1,38 +1,45 @@
import vue from '@vitejs/plugin-vue';
import * as path from "path";
import { defineConfig } from 'vite';
import { defineConfig, loadEnv } from 'vite';
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'src': path.resolve(__dirname, './src/'),
'@': path.resolve(__dirname, './src/'),
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
plugins: [vue()],
resolve: {
alias: {
'src': path.resolve(__dirname, './src/'),
'@': path.resolve(__dirname, './src/'),
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
server: {
port: 3000,
strictPort: true,
proxy: {
'/api/': {
target: 'https://api.eveal.shendai.rip/',
changeOrigin: true,
followRedirects: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
'/appraisal/': {
target: 'https://appraise.imperium.nexus/',
changeOrigin: true,
followRedirects: true,
rewrite: (path) => path.replace(/^\/appraisal/, ''),
},
'/esi/': {
target: 'https://esi.evetech.net/latest/',
changeOrigin: true,
followRedirects: true,
rewrite: (path) => path.replace(/^\/esi/, ''),
server: {
port: 3000,
strictPort: true,
proxy: {
'/api/': {
target: `https://${env.API_URL}/`,
changeOrigin: true,
followRedirects: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
'/appraisal/': {
target: `https://${env.EVEPRAISAL_URL}/`,
changeOrigin: true,
followRedirects: true,
rewrite: (path) => path.replace(/^\/appraisal/, ''),
},
'/esi/': {
target: `https://${env.ESI_URL}/latest/`,
changeOrigin: true,
followRedirects: true,
rewrite: (path) => path.replace(/^\/esi/, ''),
headers: {
'User-Agent': env.ESI_USER_AGENT
},
}
}
}
}
};
})