aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-02-06 22:56:25 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2022-02-06 22:56:25 +0200
commit63b35e0fd280dc6c4e654458a1e381e9d9dc221b (patch)
tree5d91e443cff2af0eeed8f063ee0816439968d045
parent55df6b10013dc72bc2f8f46103eb984f0991431b (diff)
Add runner api prod URL and undockerize
-rw-r--r--.env.production2
-rw-r--r--Dockerfile15
-rwxr-xr-xprod_bootstrap.sh15
3 files changed, 1 insertions, 31 deletions
diff --git a/.env.production b/.env.production
index eec4326..a7b2481 100644
--- a/.env.production
+++ b/.env.production
@@ -1 +1 @@
-VITE_API_URL=%VITE_API_URL
+VITE_RUNNER_API_URL=https://slam-lang-runner-api-6hdcd6nxsq-ew.a.run.app
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 5e53b29..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,15 +0,0 @@
-FROM node:16-alpine AS build
-
-WORKDIR /app
-COPY package-lock.json package.json ./
-RUN npm ci --only-prod
-COPY vite.config.ts tsconfig.json index.html .env.production ./
-COPY src ./src
-RUN npm run build
-
-FROM nginx:alpine AS serve
-
-RUN apk add --no-cache bash
-COPY --from=build /app/dist /usr/share/nginx/html
-COPY prod_bootstrap.sh /
-CMD ["bash", "/prod_bootstrap.sh", "/usr/share/nginx/html"]
diff --git a/prod_bootstrap.sh b/prod_bootstrap.sh
deleted file mode 100755
index c1de926..0000000
--- a/prod_bootstrap.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-DIR="${1}"
-VALID_ENV_KEYS=$(printenv | awk -F '=' '{ print $1 }' | tail | awk 'NF')
-
-for f in $(find ${DIR} -regex '.*\.js'); do
- for envKey in ${VALID_ENV_KEYS}; do
- replaced=$(printenv ${envKey})
- sed -i "s|%${envKey}|${replaced}|g" "${f}"
- echo "[bootstrap] Replaced ${envKey} from container environment."
- done
-done
-
-nginx -g "daemon off;"