mirror of
https://github.com/edufeed-org/amb-relay.git
synced 2025-12-09 16:24:33 +00:00
Deploy with docker
This commit is contained in:
parent
5e9a320e46
commit
c445b5b3ef
3 changed files with 45 additions and 114 deletions
|
|
@ -7,3 +7,40 @@ services:
|
|||
volumes:
|
||||
- ./typesense-data:/data
|
||||
command: '--data-dir /data --api-key=xyz --enable-cors'
|
||||
networks:
|
||||
- amb-network
|
||||
|
||||
amb-relay:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.relay
|
||||
restart: on-failure
|
||||
ports:
|
||||
- "3334:3334"
|
||||
depends_on:
|
||||
- typesense
|
||||
environment:
|
||||
- NAME=${NAME}
|
||||
- PUBKEY=${PUBKEY}
|
||||
- DESCRIPTION=${DESCRIPTION}
|
||||
- ICON=${ICON}
|
||||
- TS_APIKEY=${TS_APIKEY}
|
||||
- TS_HOST=http://typesense:8108
|
||||
- TS_COLLECTION=${TS_COLLECTION}
|
||||
networks:
|
||||
- amb-network
|
||||
# Use a custom entry point that checks if Typesense is ready before starting the relay
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
echo 'Waiting for Typesense to be ready...'
|
||||
while ! nc -z typesense 8108; do
|
||||
sleep 1
|
||||
done
|
||||
echo 'Typesense is ready! Starting AMB relay...'
|
||||
./amb-relay
|
||||
"
|
||||
|
||||
networks:
|
||||
amb-network:
|
||||
driver: bridge
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue