You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Every time I use the docker compose script to upgrade in portainer's stacks, I get an error that the database cannot be connected. It will only work if you delete all the data in the original permanent folder and then redeploy it.
To Reproduce
Steps to reproduce the behavior:
Upgrade steps
Enter portainer’s stacks menu.
Enter the script editing page in stacks.
Click update stacks at the bottom of the page.
Activate the re-pull image and redeploy button to re-pull the latest image.
Click update to start pulling the image again, and use the docker compose script to run the latest version of blinko.
It prompts that a problem occurred after the deployment was successful.
Expected behavior
After successful deployment, it prompts that the front end cannot connect to the postgresql database.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
使用portainer部署升级出现问题。
使用portainer部署升级出现问题。 || There is a problem using portainer to deploy and upgrade.
Dec 24, 2024
This should persist the data across container restarts and upgrades. Verify that the /volume5/docker/postgresql directory has the correct permissions and is not being cleared during the upgrade process.
Port Configuration: Ensure that the ports are correctly mapped. The postgres service is mapped from 5435 to 5432. Ensure that your DATABASE_URL in the blinko-website service reflects this mapping:
Network Configuration: Both services should be on the same network (blinko-network) to communicate properly, which you have configured correctly.
Health Checks: Ensure that the health checks are functioning correctly. The postgres service should pass its health check before the blinko-website service attempts to connect.
Prisma Connection Error: The error code P1001 suggests a connection issue. Double-check that the DATABASE_URL is correct and matches the actual running configuration of your PostgreSQL service.
Re-pull and Redeploy: When using the "re-pull image and redeploy" option, ensure that the new image is compatible with your existing data schema. If there are schema changes, you might need to run migrations.
By ensuring these configurations are correct, you should be able to resolve the connection issues during upgrades.
Describe the bug
我每次在portainer的stacks中使用docker compose脚本升级都出现数据库无法连接的错误。如果将原有永久化文件夹的数据全部删除后重新部署才行。
To Reproduce
Steps to reproduce the behavior:
升级步骤
4.激活re-pull image and redeploy按钮,重新拉取最新镜像。
Expected behavior
部署成功后提示前端无法连接postgresql数据库。
Screenshots
数据库运行正常。
Desktop (please complete the following information):
Docker compose
networks: blinko-network: driver: bridge services: blinko-website: image: blinkospace/blinko:latest container_name: blinko-website environment: NODE_ENV: production # NEXTAUTH_URL: http://localhost:1111 # NEXT_PUBLIC_BASE_URL: http://localhost:1111 NEXTAUTH_SECRET: my_ultra_secure_nextauth_secret DATABASE_URL: postgresql://postgres:Huhong@postgres:5432/postgres depends_on: postgres: condition: service_healthy # Make sure you have enough permissions. volumes: - /volume5/docker/blinko:/app/.blinko restart: always logging: options: max-size: "10m" max-file: "3" ports: - 1111:1111 healthcheck: test: ["CMD", "curl", "-f", "http://blinko-website:1111/"] interval: 30s timeout: 10s retries: 5 start_period: 30s networks: - blinko-network postgres: image: postgres:14 container_name: blinko-postgres restart: always ports: - 5435:5432 environment: POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: Huhong TZ: Asia/Shanghai # Persisting container data # Make sure you have enough permissions. volumes: - /volume5/docker/postgresql:/var/lib/postgresql/data healthcheck: test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"] interval: 5s timeout: 10s retries: 5 networks: - blinko-network
Describe the bug
Every time I use the docker compose script to upgrade in portainer's stacks, I get an error that the database cannot be connected. It will only work if you delete all the data in the original permanent folder and then redeploy it.
To Reproduce
Steps to reproduce the behavior:
Upgrade steps
Expected behavior
After successful deployment, it prompts that the front end cannot connect to the postgresql database.
Screenshots
<img width="834" alt="{58800065-946D-450E-BE67-677DE9044E24}" src="https://github.com/user-attachments/assets/14d256fc-e847-4ed3-8c22-e83c12b1d8fa" / >
The database is running normally.
<img width="350" alt="{E0841D3E-2B98-440E-BB90-7F00ABF9DCCC}" src="https://github.com/user-attachments/assets/399a2f85-108b-4d1e-ab02-3622010250e5" / >
Desktop (please complete the following information):
Docker compose
networks: blinko-network: driver:bridge services: blinko-website: image: blinkospace/blinko:latest container_name: blinko-website environment: NODE_ENV: production # NEXTAUTH_URL: http://localhost:1111 # NEXT_PUBLIC_BASE_URL: http://localhost:1111 NEXTAUTH_SECRET: my_ultra_secure_nextauth_secret DATABASE_URL: postgresql://postgres:Huhong@postgres:5432/postgres depends_on: postgres: condition: service_healthy # Make sure you have enough permissions. volumes: - /volume5/docker/blinko:/app/.blinko restart: always logging: options: max-size: "10m" max-file: "3" ports: - 1111:1111 healthcheck: test: ["CMD", "curl", "-f", "http://blinko-website:1111/"] interval: 30s timeout: 10s retries: 5 start_period: 30s networks: -blinko-network postgres: image: postgres:14 container_name: blinko-postgres restart: always ports: - 5435:5432 environment: POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: Huhong TZ: Asia/Shanghai # Persisting container data # Make sure you have enough permissions. volumes: - /volume5/docker/postgresql:/var/lib/postgresql/data healthcheck: test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"] interval: 5s timeout: 10s retries: 5 networks: -blinko-network
The text was updated successfully, but these errors were encountered: