mirror of
https://github.com/caprover/caprover
synced 2025-12-12 06:15:40 +00:00
feat(macOs): add support for macOs Catalina and above
This commit is contained in:
11
dev-scripts/dev-clean-run-as-dev-macos-step-1.sh
Executable file
11
dev-scripts/dev-clean-run-as-dev-macos-step-1.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! [ $(id -u) = 0 ]; then
|
||||
echo "Must run as sudo or root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# on macos Catalina and above, /captain is a symb link. we cannot remove the folder so we delete all files inside
|
||||
# rm -rf /captain && mkdir /captain
|
||||
rm -rf /captain/*
|
||||
chmod -R 777 /captain/
|
||||
19
dev-scripts/dev-clean-run-as-dev-macos-step-2.sh
Executable file
19
dev-scripts/dev-clean-run-as-dev-macos-step-2.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
if ! [ $(id -u) <> 0 ]; then
|
||||
echo "Must not be run as sudo or root on macos (macos security) please run the step 1 as root and this step as standard user"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker service rm $(docker service ls -q)
|
||||
sleep 1
|
||||
docker secret rm captain-salt
|
||||
docker build -t captain-debug -f dockerfile-captain.debug .
|
||||
docker run \
|
||||
-e "CAPTAIN_IS_DEBUG=1" \
|
||||
-e "MAIN_NODE_IP_ADDRESS=127.0.0.1" \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /captain:/captain \
|
||||
-v $(pwd):/usr/src/app captain-debug
|
||||
sleep 2s
|
||||
docker service logs captain-captain --follow
|
||||
Reference in New Issue
Block a user