allowed hosts
Build and Push Docker Images / build-and-push (push) Successful in 21s

This commit is contained in:
2025-05-08 16:43:11 +02:00
parent 9732f52404
commit fa534b65f2
4 changed files with 21 additions and 12 deletions
+3
View File
@@ -27,6 +27,9 @@ ENV JWT_SECRET=secret
ENV ADMIN_JWT_SECRET=secret
ENV APP_KEYS=secret
# Optionally set a default value for ALLOWED_HOSTS
ENV ALLOWED_HOSTS=localhost
# No need to build in development mode
EXPOSE 1337
+1
View File
@@ -15,6 +15,7 @@ services:
ADMIN_JWT_SECRET: d9cqEottMoABxcmp
APP_KEYS: szkCL5n0Mwyqo6ef
API_TOKEN_SALT: pMJRhpA4J+zUHzJO
ALLOWED_HOSTS: "localhost,127.0.0.1"
ports:
- "1337:1337"
depends_on:
@@ -1,12 +0,0 @@
import { mergeConfig, type UserConfig } from 'vite';
export default (config: UserConfig) => {
// Important: always return the modified config
return mergeConfig(config, {
resolve: {
alias: {
'@': '/src',
},
},
});
};
@@ -0,0 +1,17 @@
import { mergeConfig, type UserConfig } from "vite";
export default (config: UserConfig) => {
// Read ALLOWED_HOSTS from environment and inject as VITE_ALLOWED_HOSTS
const allowedHosts = process.env.ALLOWED_HOSTS || "localhost";
return mergeConfig(config, {
resolve: {
alias: {
"@": "/src",
},
},
define: {
"import.meta.env.VITE_ALLOWED_HOSTS": JSON.stringify(allowedHosts),
},
});
};