alpine + env

This commit is contained in:
2023-09-16 20:55:14 +02:00
parent dcdb24c591
commit 20defc5b0f
3 changed files with 8 additions and 4 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

@@ -19,22 +19,25 @@ export default defineConfig(({ mode }) => {
strictPort: true, strictPort: true,
proxy: { proxy: {
'/api/': { '/api/': {
target: 'https://api.eveal.shendai.rip/', target: `https://${env.API_URL}/`,
changeOrigin: true, changeOrigin: true,
followRedirects: true, followRedirects: true,
rewrite: (path) => path.replace(/^\/api/, ''), rewrite: (path) => path.replace(/^\/api/, ''),
}, },
'/appraisal/': { '/appraisal/': {
target: 'https://appraise.imperium.nexus/', target: `https://${env.EVEPRAISAL_URL}/`,
changeOrigin: true, changeOrigin: true,
followRedirects: true, followRedirects: true,
rewrite: (path) => path.replace(/^\/appraisal/, ''), rewrite: (path) => path.replace(/^\/appraisal/, ''),
}, },
'/esi/': { '/esi/': {
target: 'https://esi.evetech.net/latest/', target: `https://${env.ESI_URL}/latest/`,
changeOrigin: true, changeOrigin: true,
followRedirects: true, followRedirects: true,
rewrite: (path) => path.replace(/^\/esi/, ''), rewrite: (path) => path.replace(/^\/esi/, ''),
headers: {
'User-Agent': env.ESI_USER_AGENT
},
} }
} }
} }