Fix vue config when using docker

This commit is contained in:
Gaëtan L
2023-02-16 16:48:29 +01:00
parent 7c5b43a990
commit c983be490a
3 changed files with 7 additions and 1 deletions
+2
View File
@@ -29,5 +29,7 @@ services:
volumes:
- ./frontend/:/home/node/
command: "yarn serve"
environment:
DOCKER: "yes"
depends_on:
- api
+4 -1
View File
@@ -2,7 +2,10 @@ module.exports = {
devServer: {
proxy: {
"/api": {
target: "http://localhost:8000/",
target:
process.env.DOCKER == "yes"
? "http://api:8000/"
: "http://localhost:8000",
},
},
},
+1
View File
@@ -28,6 +28,7 @@ SECRET_KEY = '!8o(-dbbl3e+*bh7nx-^xysdt)1gso*%@4ze4-9_9o+i&t--u_'
DEBUG = 'DEBUG' in os.environ
ALLOWED_HOSTS = [
'api',
'127.0.0.1',
'localhost',
]