umami-software / umami

Umami is a simple, fast, privacy-focused alternative to Google Analytics.
https://umami.is
MIT License
23.12k stars 4.3k forks source link

Deployment instructions for Vercel/Netlify #18

Closed pbshgthm closed 4 years ago

pbshgthm commented 4 years ago

Would be great to have instructions for deploying on platforms like Vercel, for those who aren't familiar with Databases

pedrogpimenta commented 4 years ago

I just did it, you just need to set the Github Repo to the umami one and deploy!

The only thing I'm not finding is the default admin password, care to chip in @mikecao ? Thanks!

mikecao commented 4 years ago

@pedrogpimenta It should be covered here https://umami.is/docs/login. I really need to update the README here.

@pbshgthm Yes, working on some documentation on hosting right now.

pbshgthm commented 4 years ago

@mikecao I'm getting a incorrect username/password error on deploying to vercel. Used the credentials mentioned in the umami docs.

pbshgthm commented 4 years ago

I just did it, you just need to set the Github Repo to the umami one and deploy!

The only thing I'm not finding is the default admin password, care to chip in @mikecao ? Thanks!

@pedrogpimenta please put a note here if you have successfully deployed to Vercel. Thanks!

mikecao commented 4 years ago

Note, when deploying to Vercel, you need to override the build command with yarn build-postgresql-client && yarn build or yarn build-mysql-client && yarn build depending on your database

pedrogpimenta commented 4 years ago

I have the same problem as @pbshgthm , user and password are not correct. But I'm waiting for you to get those fresh docs out, no worries :)

pbshgthm commented 4 years ago

Note, when deploying to Vercel, you need to override the build command with yarn build-postgresql-client && yarn build or yarn build-mysql-client && yarn build depending on your database

@mikecao How to configure the database when using Vercel. Pardon me, I know very little about DB

atinux commented 4 years ago

@pbshgthm You need to create a database on a hosting platform (Render.com, Scaleway, Compose, etc).

Then you need to add the environments variables:

DATABASE_URL=(connection url)
HASH_SALT=(any random string)

See more on https://umami.is/docs/install

Overwrite the build command to be:

yarn build build-postgresql-schema && yarn build-mysql-client && yarn build

Screenshot 2020-08-19 at 15 25 18

pbshgthm commented 4 years ago

@mikecao @Atinux I followed your instructions and I'm getting the following error. Error: Either provide --schema or make sure that you are in a folder with a schema.prisma file.

mikecao commented 4 years ago

You don't need to build the schema, only the client. And you can ignore that error, it's generated by prisma post install script.

vvo commented 4 years ago

Hey there, just wrote a post on how to install Umami on Vercel, see: https://dev.to/vvo/self-hosted-analytics-with-umami-on-vercel-55ma

RizkyRajitha commented 4 years ago

hi, i had errors with prisma and solved with this command in vercel npm run build-tracker && npm run build-app && npm run build-postgresql-client i added schemes(tables) to db separately with sql editor

mikecao commented 4 years ago

If you are using the latest version, you only need to run yarn build or npm run build. It will do all the required steps for you.