Open sohaib94 opened 4 months ago
Got the same error here when trying to update my instance on ubuntu, using the update command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/upgrade-hobby)"
Same over here, makes updating and installing impossible.
It seems the elasticsearch is missing from the docker-compose.hobby.yml file.
Hey folks, Do we have any fixes for this issue? We're seeing the same issue as well.
Hey folks, Do we have any fixes for this issue? We're seeing the same issue as well.
If you have the docker-compose.base.yml
file you can directly remove the .services.temporal.depends_on.elasticsearch
section and it should come up.
For me, I copied the deploy-hobby
script and added a line using yq to remove that block between the echo "Starting the stack!"
line and the sudo -E docker-compose -f docker-compose.yml up -d
line like so:
echo "Starting the stack!"
yq -i 'del(.services.temporal.depends_on.elasticsearch)' docker-compose.base.yml
sudo -E docker-compose -f docker-compose.yml up -d
(That said my deployment still isn't working - getting a You are using the default SECRET_KEY in a production environment
in the temporal-django-worker
and an IS_BEHIND_PROXY
error in the web one though I think these are separate issues)
For a proper fix, I think the elasticsearch dependency needs to be removed from the docker-compose.base.yml
and put in the other docker compose files which require elasticsearch.
Would be happy to do this myself if one of the owners can accept the issue - would be good to finally contribute to an OSS project :D
same issue here when installing:
service "temporal" depends on undefined service elasticsearch: invalid compose project
makes it difficult to convince the company I work for to use this product when a developer can't install it
same here service "temporal" depends on undefined service "elasticsearch": invalid │ compose project
thinking about changing install script to use different git repository tag but need to find out when this started to occur
same here, would appreciate if this gets fixed soon unless somebody wants to promote their cloud offering .....
UPDATE:
I got it working by using the following version of the docker-compose.base.yml file:
I also had to remove https support from the caddy config file
One workaround for the non-working docker-compose.yml
:
elasticsearch
to docker-compose.yml
upgrade-hobby
script to force it to keep your fixed docker-compose.yml
instead of pulling the broken version from git master (see the snippet below)upgrade-hobby
script.temporal-django-worker
service, as it won't start until the envs loading is fixed.docker-compose.yml
(ie docker-compose.hobby.yml
) with the HEAD versiondocker-compose.yml
on top of the temporal
service add the missing elasticsearch
service:
elasticsearch:
extends:
file: docker-compose.base.yml
service: elasticsearch
expose:
- 9200
docker-compose.yml
with the broken version from git, eg as:
# rm -f docker-compose.yml
cp docker-compose.yml docker-compose.yml.tmpl
cp posthog/docker-compose.base.yml docker-compose.base.yml
# cp posthog/docker-compose.hobby.yml docker-compose.yml.tmpl
envsubst < docker-compose.yml.tmpl > docker-compose.yml
rm docker-compose.yml.tmpl
./upgrade-hobby
docker compose start
docker compose stop temporal-django-worker
I couldn't get temporal-django-worker
to work, as others said, it doesn't inherit any of the envs. Though it's also not critical - as far as I see the main consequence is the Insights now require a manual press on the "Refresh" button, as it stops auto-refreshing by itself. Some other async routines aren't going to work either, I imagine.
But other services load the env vars correctly and run ok.
Forgot to mention the manual fixes required for the non-working docker-compose.hobby.yml
. Updated the previous comment.
Bug description
When you use the curl command https://posthog.com/docs/self-host to deploy on a Ubuntu machine, you get the following error:
This seems to be caused by the
temporal
service depending on the existence ofelasticsearch
in thedocker-compose.base.yml
file - removing that dependency and running again fixes the issue.How to reproduce
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby)"
Additional context
Debug info