maybe
This commit is contained in:
parent
adebf722f0
commit
986cd3a128
15
backend/entrypoint.sh
Normal file
15
backend/entrypoint.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# La BDD doit être prête avant les migrations et la création de l'administrateur.
|
||||
count=0
|
||||
until python manage.py migrate --noinput; do
|
||||
count=$((count + 1))
|
||||
if [ "$count" -ge 30 ]; then
|
||||
echo "Initialisation Django impossible après 30 tentatives." >&2
|
||||
exit 1
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
python manage.py ensure_admin
|
||||
exec python manage.py runserver 0.0.0.0:1029
|
||||
@ -1,7 +1,10 @@
|
||||
import axios from 'axios'
|
||||
const ACCESS = 'drive_access', REFRESH = 'drive_refresh'
|
||||
// Single origin for JSON, previews, videos, and token renewal.
|
||||
export const api = axios.create({baseURL:'/api', headers:{Accept:'application/json'}})
|
||||
export const api = axios.create({
|
||||
baseURL: import.meta.env?.PROD ? '/api' : `http://${window.location.hostname}:1029/api`,
|
||||
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
||||
});
|
||||
const raw = axios.create({baseURL:'/api', headers:{Accept:'application/json'}})
|
||||
export const savedToken = () => sessionStorage.getItem(ACCESS)
|
||||
export const storeTokens = data => {
|
||||
|
||||
@ -15,17 +15,6 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 1028,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: process.env.VITE_API_PROXY_TARGET || 'http://backend:1029',
|
||||
changeOrigin: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
preview: {
|
||||
allowedHosts: [
|
||||
'goodrive.louismazin.ovh',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user