-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executa o script de configuração do Umami ao subir os serviços localmente #1827
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
É a primeira vez que estou rodando o TabNews desde o merge do Umami, mas aqui nesta branch não subiu. Precisa configurar algo ou executar outro comando, ou só executar npm run dev
?
Edit: Quando rodei, deu o erro abaixo. Consegui arrumar criando o banco com CREATE DATABASE umami;
. Não acha que faz sentido executar o arquivo 01-create-umami-database.sql
no arquivo config-umami.js
, caso o banco não exista?
➜ tabnews.com.br git:(feat/umami-dev-config) npm run dev
> tabnews.com.br@1.0.0 dev
> npm run services:seed && npm run next && npm run services:stop
> tabnews.com.br@1.0.0 services:seed
> kill-port 3000 && npm run services:up && npm run migration:run && npm run migration:seed && npm run umami:config
Process on port 3000 killed
> tabnews.com.br@1.0.0 services:up
> npm run docker:compose -- up -d
> tabnews.com.br@1.0.0 docker:compose
> docker compose --env-file .env -f infra/docker-compose.development.yml up -d
[+] Running 16/1
✔ umami Pulled 25.0s
[+] Running 3/3
✔ Container mailcatcher Started 2.6s
✔ Container postgres-dev Healthy 7.9s
✔ Container tabnews-umami-1 Started 6.2s
> tabnews.com.br@1.0.0 migration:run
> node -r dotenv-expand/config infra/scripts/wait-for-db-connection-ready.js && node-pg-migrate up --envPath ./.env -m infra/migrations/ 2>migrations.log
health check postgres: /var/run/postgresql:5432 - accepting connections
No migrations to run!
Migrations complete!
> tabnews.com.br@1.0.0 migration:seed
> node -r dotenv-expand/config infra/scripts/seed-database.js
> Seeding database...
------------------------------
> You can now Login to TabNews using the following credentials:
> "admin@admin.com" + "password"
> "user@user.com" + "password"
------------------------------
> Creating Firewall functions...
> Firewall functions created!
> Database seeded!
> tabnews.com.br@1.0.0 umami:config
> node -r dotenv-expand/config infra/scripts/config-umami.js
> Waiting for Umami Server to start...
> Endpoint: http://localhost:3001
> Umami is not ready, waiting...
> Umami is not ready, waiting...
> Umami is not ready, waiting...
> Umami is not ready, waiting...
🔴 Umami is not ready, exiting...
O #1826 traz mudanças no contêiner do PostgreSQL que só serão aplicadas automaticamente com a recriação dele. Por isso, recomendo rodar o
Acho que não. |
f6427c9
to
af22017
Compare
Executa o script de configuração do Umami ao subir os serviços localmente. Com isso, caso a configuração ainda não tenha sido realizada no ambiente local, ela será criada de maneira padronizada para permitir executar testes localmente (por enquanto apenas testes manuais).
O servidor subirá na porta
3001
, com usuárioadmin
, senhaumami
e com estatísticas para o websiteTabNews Dev
.