docker
This commit is contained in:
1 parent
9bce91c20d
commit
3a1fb61847
3 files changed
+19
-3
No files matched your search
@@ -1,2 +1,4 @@
|
||||
VITE_APP_HOST="http://147.182.153.60"
|
||||
VITE_APP_API_BASE_URL="http://147.182.153.60:52345/api/v1"
|
||||
VITE_APP_GLOBAL_REFRESH=UPTIME_APP_GLOBAL_REFRESH
|
||||
VITE_APP_HOST=UPTIME_APP_HOST
|
||||
VITE_APP_API_BASE_URL=UPTIME_APP_API_BASE_URL
|
||||
VITE_APP_DEPLOYMENT_MODE=UPTIME_APP_DEPLOYMENT_MODE
|
||||
+7
-1
@@ -7,8 +7,14 @@ RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Serve
|
||||
# Run stage
|
||||
FROM nginx:1.27.1-alpine
|
||||
|
||||
# Environment variables
|
||||
COPY --from=build /app/env.sh /docker-entrypoint.d/env.sh
|
||||
RUN chmod +x /docker-entrypoint.d/env.sh
|
||||
|
||||
# Serve
|
||||
COPY ./nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
for i in $(env | grep UPTIME_APP_)
|
||||
do
|
||||
key=$(echo $i | cut -d '=' -f 1)
|
||||
value=$(echo $i | cut -d '=' -f 2-)
|
||||
echo $key=$value
|
||||
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' +
|
||||
done
|
||||
Reference in new issue
Block a user