-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·33 lines (25 loc) · 1.13 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Remove containers with ancestor ghcr.io/kekehurry/cityflow_runner:latest
runner_containers=$(docker ps -a --filter "ancestor=ghcr.io/kekehurry/cityflow_runner:full" --format "{{.ID}}")
if [ -n "$runner_containers" ]; then
echo "$runner_containers" | xargs docker rm -f
fi
# Remove containers with ancestor ghcr.io/kekehurry/cityflow_platform:latest
platform_containers=$(docker ps -a --filter "ancestor=ghcr.io/kekehurry/cityflow_platform:dev" --format "{{.ID}}")
if [ -n "$platform_containers" ]; then
echo "$platform_containers" | xargs docker rm -f
fi
docker system prune --all --force
docker pull ghcr.io/kekehurry/cityflow_runner:dev
docker pull ghcr.io/kekehurry/cityflow_platform:dev
docker image tag ghcr.io/kekehurry/cityflow_runner:dev ghcr.io/kekehurry/cityflow_runner:full
# create cityflow_platform directory
cd ~
mkdir -p cityflow_platform
cd cityflow_platform
# Run the cityflow_platform container
docker run -d \
--name cityflow_platform \
-p 3001:3000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD/temp:/cityflow_platform/cityflow_executor/code \
ghcr.io/kekehurry/cityflow_platform:dev