mirror of
https://github.com/AppFlowy-IO/AppFlowy-Cloud.git
synced 2025-04-19 03:24:42 -04:00
Merge pull request #1342 from AppFlowy-IO/simplify-appflowy-web-docker
feat: simplify appflowy web docker setup
This commit is contained in:
commit
b0cd3c4d51
4 changed files with 1 additions and 22 deletions
|
@ -6,9 +6,6 @@
|
|||
FQDN=localhost
|
||||
# Change this to https if you wish to enable TLS.
|
||||
SCHEME=http
|
||||
# If this has changed, AppFlowy Web might still use the old value due to Javascript cache.
|
||||
# If AppFlowy Web is sending requests to the wrong URL, do a hard reload on the browser,
|
||||
# and/or purge Cloudflare cache if you are using CloudFlare.
|
||||
APPFLOWY_BASE_URL=${SCHEME}://${FQDN}
|
||||
|
||||
# PostgreSQL Settings
|
||||
|
|
|
@ -216,9 +216,6 @@ services:
|
|||
image: appflowyinc/appflowy_web:${APPFLOWY_WEB_VERSION:-latest}
|
||||
depends_on:
|
||||
- appflowy_cloud
|
||||
environment:
|
||||
- AF_BASE_URL=${APPFLOWY_BASE_URL:?err}
|
||||
- AF_GOTRUE_URL=${API_EXTERNAL_URL}
|
||||
volumes:
|
||||
postgres_data:
|
||||
minio_data:
|
||||
|
|
|
@ -8,12 +8,9 @@ ARG VERSION=main
|
|||
RUN npm install -g pnpm@8.5.0
|
||||
RUN git clone --depth 1 --branch ${VERSION} https://github.com/AppFlowy-IO/AppFlowy-Web.git .
|
||||
RUN pnpm install
|
||||
ENV AF_BASE_URL=AF_BASE_URL_PLACEHOLDER
|
||||
ENV AF_GOTRUE_URL=AF_GOTRUE_URL_PLACEHOLDER
|
||||
RUN sed -i 's|https://test.appflowy.cloud||g' src/components/main/app.hooks.ts
|
||||
RUN pnpm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html/
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY env.sh /docker-entrypoint.d/env.sh
|
||||
RUN chmod +x /docker-entrypoint.d/env.sh
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#!bin/sh
|
||||
STATIC_JS_FILE_PATH="/usr/share/nginx/html/static/js"
|
||||
if [ -z "${AF_BASE_URL}" ]; then
|
||||
echo "Error: AF_BASE_URL is not set."
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${AF_GOTRUE_URL}" ]; then
|
||||
echo "Error: AF_BASE_URL is not set."
|
||||
exit 1
|
||||
fi
|
||||
find ${STATIC_JS_FILE_PATH} -type f -exec sed -i "s|AF_BASE_URL_PLACEHOLDER|$AF_BASE_URL|g" {} +
|
||||
find ${STATIC_JS_FILE_PATH} -type f -exec sed -i "s|AF_GOTRUE_URL_PLACEHOLDER|$AF_GOTRUE_URL|g" {} +
|
Loading…
Add table
Reference in a new issue