Created
January 26, 2025 13:09
-
-
Save HeCorr/786a7258496c033a7949b9e42ebd3985 to your computer and use it in GitHub Desktop.
a Docker Compose file for YugabyteDB that actually fucking works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To open SQL shell: | |
# docker exec -it yugabyte bash -c '/home/yugabyte/bin/ysqlsh -e -h $(hostname) -P null="(NULL)"' | |
services: | |
yugabyte: | |
image: yugabytedb/yugabyte:latest | |
container_name: yugabyte | |
restart: unless-stopped | |
command: bash -c 'bin/yugabyted start --advertise_address="$$(hostname -i)" --background=false' | |
# ^^^ required to prevent network binding errors if container's ip changes | |
ports: | |
- 5433:5433 | |
- 7000:7000 | |
- 9000:9000 | |
volumes: | |
- yugabyte_vol:/root/var/ | |
networks: | |
- yugabyte_net | |
volumes: | |
yugabyte_vol: | |
networks: | |
yugabyte_net: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment