forked from github/plane
selfhosting fixes for custom branch and platform (#4431)
This commit is contained in:
parent
dc77e4afdb
commit
74eb50aa1a
@ -42,6 +42,7 @@ services:
|
|||||||
web:
|
web:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: ${DOCKERHUB_USER:-makeplane}/plane-frontend:${APP_RELEASE:-stable}
|
image: ${DOCKERHUB_USER:-makeplane}/plane-frontend:${APP_RELEASE:-stable}
|
||||||
|
platform: ${DOCKER_PLATFORM:-}
|
||||||
pull_policy: ${PULL_POLICY:-always}
|
pull_policy: ${PULL_POLICY:-always}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: node web/server.js web
|
command: node web/server.js web
|
||||||
@ -54,6 +55,7 @@ services:
|
|||||||
space:
|
space:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: ${DOCKERHUB_USER:-makeplane}/plane-space:${APP_RELEASE:-stable}
|
image: ${DOCKERHUB_USER:-makeplane}/plane-space:${APP_RELEASE:-stable}
|
||||||
|
platform: ${DOCKER_PLATFORM:-}
|
||||||
pull_policy: ${PULL_POLICY:-always}
|
pull_policy: ${PULL_POLICY:-always}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: node space/server.js space
|
command: node space/server.js space
|
||||||
@ -66,7 +68,8 @@ services:
|
|||||||
|
|
||||||
admin:
|
admin:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: ${DOCKERHUB_USER:-makeplane}/plane-space:${APP_RELEASE:-stable}
|
image: ${DOCKERHUB_USER:-makeplane}/plane-admin:${APP_RELEASE:-stable}
|
||||||
|
platform: ${DOCKER_PLATFORM:-}
|
||||||
pull_policy: ${PULL_POLICY:-always}
|
pull_policy: ${PULL_POLICY:-always}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: node admin/server.js admin
|
command: node admin/server.js admin
|
||||||
@ -79,6 +82,7 @@ services:
|
|||||||
api:
|
api:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
||||||
|
platform: ${DOCKER_PLATFORM:-}
|
||||||
pull_policy: ${PULL_POLICY:-always}
|
pull_policy: ${PULL_POLICY:-always}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ./bin/takeoff
|
command: ./bin/takeoff
|
||||||
@ -93,6 +97,7 @@ services:
|
|||||||
worker:
|
worker:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
||||||
|
platform: ${DOCKER_PLATFORM:-}
|
||||||
pull_policy: ${PULL_POLICY:-always}
|
pull_policy: ${PULL_POLICY:-always}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ./bin/worker
|
command: ./bin/worker
|
||||||
@ -106,6 +111,7 @@ services:
|
|||||||
beat-worker:
|
beat-worker:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
||||||
|
platform: ${DOCKER_PLATFORM:-}
|
||||||
pull_policy: ${PULL_POLICY:-always}
|
pull_policy: ${PULL_POLICY:-always}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ./bin/beat
|
command: ./bin/beat
|
||||||
@ -119,6 +125,7 @@ services:
|
|||||||
migrator:
|
migrator:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
|
||||||
|
platform: ${DOCKER_PLATFORM:-}
|
||||||
pull_policy: ${PULL_POLICY:-always}
|
pull_policy: ${PULL_POLICY:-always}
|
||||||
restart: no
|
restart: no
|
||||||
command: >
|
command: >
|
||||||
@ -138,6 +145,7 @@ services:
|
|||||||
command: postgres -c 'max_connections=1000'
|
command: postgres -c 'max_connections=1000'
|
||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
|
|
||||||
plane-redis:
|
plane-redis:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: redis:7.2.4-alpine
|
image: redis:7.2.4-alpine
|
||||||
@ -148,7 +156,7 @@ services:
|
|||||||
|
|
||||||
plane-minio:
|
plane-minio:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: minio/minio
|
image: minio/minio:latest
|
||||||
pull_policy: if_not_present
|
pull_policy: if_not_present
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: server /export --console-address ":9090"
|
command: server /export --console-address ":9090"
|
||||||
@ -159,6 +167,7 @@ services:
|
|||||||
proxy:
|
proxy:
|
||||||
<<: *app-env
|
<<: *app-env
|
||||||
image: ${DOCKERHUB_USER:-makeplane}/plane-proxy:${APP_RELEASE:-stable}
|
image: ${DOCKERHUB_USER:-makeplane}/plane-proxy:${APP_RELEASE:-stable}
|
||||||
|
platform: ${DOCKER_PLATFORM:-}
|
||||||
pull_policy: ${PULL_POLICY:-always}
|
pull_policy: ${PULL_POLICY:-always}
|
||||||
ports:
|
ports:
|
||||||
- ${NGINX_PORT}:80
|
- ${NGINX_PORT}:80
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
BRANCH=master
|
BRANCH=master
|
||||||
SCRIPT_DIR=$PWD
|
SCRIPT_DIR=$PWD
|
||||||
PLANE_INSTALL_DIR=$PWD/plane-app
|
SERVICE_FOLDER=plane-app
|
||||||
|
PLANE_INSTALL_DIR=$PWD/$SERVICE_FOLDER
|
||||||
export APP_RELEASE=$BRANCH
|
export APP_RELEASE=$BRANCH
|
||||||
export DOCKERHUB_USER=makeplane
|
export DOCKERHUB_USER=makeplane
|
||||||
export PULL_POLICY=always
|
export PULL_POLICY=always
|
||||||
@ -140,7 +141,7 @@ function download() {
|
|||||||
function startServices() {
|
function startServices() {
|
||||||
/bin/bash -c "$COMPOSE_CMD -f $DOCKER_FILE_PATH --env-file=$DOCKER_ENV_PATH up -d --quiet-pull"
|
/bin/bash -c "$COMPOSE_CMD -f $DOCKER_FILE_PATH --env-file=$DOCKER_ENV_PATH up -d --quiet-pull"
|
||||||
|
|
||||||
local migrator_container_id=$(docker container ls -aq -f "name=plane-app-migrator")
|
local migrator_container_id=$(docker container ls -aq -f "name=$SERVICE_FOLDER-migrator")
|
||||||
if [ -n "$migrator_container_id" ]; then
|
if [ -n "$migrator_container_id" ]; then
|
||||||
local idx=0
|
local idx=0
|
||||||
while docker inspect --format='{{.State.Status}}' $migrator_container_id | grep -q "running"; do
|
while docker inspect --format='{{.State.Status}}' $migrator_container_id | grep -q "running"; do
|
||||||
@ -168,7 +169,7 @@ function startServices() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local api_container_id=$(docker container ls -q -f "name=plane-app-api")
|
local api_container_id=$(docker container ls -q -f "name=$SERVICE_FOLDER-api")
|
||||||
local idx2=0
|
local idx2=0
|
||||||
while ! docker logs $api_container_id 2>&1 | grep -m 1 -i "Application startup complete" | grep -q ".";
|
while ! docker logs $api_container_id 2>&1 | grep -m 1 -i "Application startup complete" | grep -q ".";
|
||||||
do
|
do
|
||||||
@ -408,7 +409,8 @@ fi
|
|||||||
# REMOVE SPECIAL CHARACTERS FROM BRANCH NAME
|
# REMOVE SPECIAL CHARACTERS FROM BRANCH NAME
|
||||||
if [ "$BRANCH" != "master" ];
|
if [ "$BRANCH" != "master" ];
|
||||||
then
|
then
|
||||||
PLANE_INSTALL_DIR=$PWD/plane-app-$(echo $BRANCH | sed -r 's@(\/|" "|\.)@-@g')
|
SERVICE_FOLDER=plane-app-$(echo $BRANCH | sed -r 's@(\/|" "|\.)@-@g')
|
||||||
|
PLANE_INSTALL_DIR=$PWD/$SERVICE_FOLDER
|
||||||
fi
|
fi
|
||||||
mkdir -p $PLANE_INSTALL_DIR/archive
|
mkdir -p $PLANE_INSTALL_DIR/archive
|
||||||
|
|
||||||
|
@ -43,3 +43,6 @@ FILE_SIZE_LIMIT=5242880
|
|||||||
|
|
||||||
# Gunicorn Workers
|
# Gunicorn Workers
|
||||||
GUNICORN_WORKERS=1
|
GUNICORN_WORKERS=1
|
||||||
|
|
||||||
|
# UNCOMMENT `DOCKER_PLATFORM` IF YOU ARE ON `ARM64` AND DOCKER IMAGE IS NOT AVAILABLE FOR RESPECTIVE `APP_RELEASE`
|
||||||
|
# DOCKER_PLATFORM=linux/amd64
|
Loading…
Reference in New Issue
Block a user