Use a script to start urbit ship to handle restarts
This commit is contained in:
parent
156e3611a0
commit
92c86b2cf4
@ -30,9 +30,9 @@ services:
|
||||
command: ["./deploy-to-urbit.sh"]
|
||||
volumes:
|
||||
- uniswap_build:/app/build
|
||||
- pier_data: /app/pier
|
||||
- urbit_data:/urbit
|
||||
- ../config/uniswap-frontend/deploy-to-urbit.sh:/app/deploy-to-urbit.sh
|
||||
|
||||
volumes:
|
||||
uniswap_build:
|
||||
pier_data:
|
||||
urbit_data:
|
||||
|
@ -4,9 +4,10 @@ services:
|
||||
urbit-fake-ship:
|
||||
restart: unless-stopped
|
||||
image: tloncorp/vere
|
||||
entrypoint: ["bash", "-c", "urbit -t -F zod"]
|
||||
entrypoint: ["bash", "-c", "./run-urbit-ship.sh"]
|
||||
volumes:
|
||||
- pier_data:/urbit/zod/
|
||||
- urbit_data:/urbit
|
||||
- ../config/uniswap-frontend/run-urbit-ship.sh:/urbit/run-urbit-ship.sh
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "12321:12321"
|
||||
@ -18,4 +19,4 @@ services:
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
pier_data:
|
||||
urbit_data:
|
||||
|
0
stack_orchestrator/data/config/uniswap-frontend/deploy-to-urbit.sh
Normal file → Executable file
0
stack_orchestrator/data/config/uniswap-frontend/deploy-to-urbit.sh
Normal file → Executable file
17
stack_orchestrator/data/config/uniswap-frontend/run-urbit-ship.sh
Executable file
17
stack_orchestrator/data/config/uniswap-frontend/run-urbit-ship.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
pier_dir="/urbit/zod"
|
||||
|
||||
# Check if the directory exists
|
||||
if [ -d "$pier_dir" ]; then
|
||||
echo "Pier directory already exists, rebooting..."
|
||||
urbit -t zod
|
||||
else
|
||||
echo "Creating a new fake ship..."
|
||||
urbit -t -F zod
|
||||
fi
|
@ -6,4 +6,4 @@ source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
# See: https://stackoverflow.com/a/246128/1701505
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
docker build -t cerc/uniswap-urbit-deployment:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args}
|
||||
docker build -t cerc/uniswap-urbit-deployment:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${SCRIPT_DIR}
|
||||
|
Loading…
Reference in New Issue
Block a user