Add Docker support with runtime environment variable configuration
- Remove temporary arne.js file - Add runtime configuration via window.__RUNTIME_CONFIG__ - Create public/config.template.js for hostname injection - Add Dockerfile with multi-stage build (node + nginx) - Add docker-entrypoint.sh to generate config.js at startup - Add .dockerignore - Update all components to use runtime config instead of arne.js - Update index.html to load config.js before app This allows deploying the same Docker image to different environments by setting the API_HOSTNAME environment variable at runtime. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import arne from '../../arne.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -47,7 +46,7 @@ export default {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.axios({
|
||||
method: "get",
|
||||
url: `${arne.hostname}/music/reset`,
|
||||
url: `${window.__RUNTIME_CONFIG__.API_HOSTNAME}/music/reset`,
|
||||
})
|
||||
.then(() => {
|
||||
resolve();
|
||||
@@ -62,7 +61,7 @@ export default {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.axios({
|
||||
method: "get",
|
||||
url: `${arne.hostname}/sync`,
|
||||
url: `${window.__RUNTIME_CONFIG__.API_HOSTNAME}/sync`,
|
||||
})
|
||||
.then(() => {
|
||||
resolve();
|
||||
|
||||
Reference in New Issue
Block a user