Docker Container keeps crashing when upgrading to v2.0 #3205
-
Hi all, I am running Plausible through CapRover. I am trying to install the new V2 release. I've managed to upgrade the clickhouse DB without any problem. The issue arises when trying to update the main image. CapRover uses the docker API, so docker-compose doesn't work.
Instead I can do a deploy directly from the image, specifically This works, the image spins up, but then after a few seconds it crashes. This is not enough time for me to The error which kills the process is Following some other issues and discussions here from Github, I could figure out that it crashes because the Postgres DB doesn't have this table. However, because the container crashes within a few seconds, I can't run the migration script. Is there any way I could create the minimum required tables directly in the Postgres container so that the. plausible container start-up, without any data, and then Any help would be much appreciated! The full error just in case:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Referencing the following other issues/discussions: |
Beta Was this translation helpful? Give feedback.
-
I wonder if you can execute a one off command like $ docker run -ti --rm plausible/analytics:v2.0.0 /entrypoint.sh db migrate with CapRover? |
Beta Was this translation helpful? Give feedback.
-
Hi @ruslandoga, Thanks so much for the super fast reply. I've had to modify this a bit into a new dockerfile, which looks like this:
However this throws the following error:
The database runs as a separate container, and I'm trying to get the new V2 version to work on the main plausible container. Just because it failed a few times, I've reverted back to the previous version (pre-1.5) and everything works the way it should. Now, I am trying to get this to a stable container in the plausible-v2 container, with no luck, as it keeps on crashing. |
Beta Was this translation helpful? Give feedback.
-
Thank you! Using CapRover upgrade of Plausible One-Click-App to V2:
Method 4: Deploy plain Dockerfile.
PS: You can continue to drop the v1 tables as per the upgrade guide if needed :) To do that, run Thank you so very much to @ruslandoga, this wouldn't have been possible without him, and he saved me hours of frustration in a matter of minutes. |
Beta Was this translation helpful? Give feedback.
RUN
is executed at image build-time (and you probably don't have all theENV
set up so it fails). You probably want to put it intoCMD
to make it run in the container:CMD /entrypoint.sh db migrate & /entrypoint.sh run