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
dist-ssr dist-ssr
*.local *.local
docker-compose.yml
# Editor directories and files # Editor directories and files
.vscode/* .vscode/*

View File

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

View File

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