Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Fixes #4957 - Updated yaml health check to port 8080 as per Penpot 2.4.* changes #5047

Conversation

stewnight
Copy link

Changes

  • Penpot frontend service health check port changed from port 80 to port 8080.

Issues

@stewnight
Copy link
Author

My first public pull request - apologies if I have done it wrong, I tried following your steps as closely as possible

@vectorcr
Copy link

vectorcr commented Feb 4, 2025

hmm jut tried this fix, and my container for penpot is still not showing healthy, it fails on the deployment. I am on version 390 and installed penpot from the available images

@stewnight
Copy link
Author

hmm jut tried this fix, and my container for penpot is still not showing healthy, it fails on the deployment. I am on version 390 and installed penpot from the available images

It does take a few minutes for the frontend to show as healthy. Is the penpot frontend ui accessible to you?

@peaklabs-dev peaklabs-dev added the ⚙️ Service Issues requesting or PRs adding/fixing service templates. label Feb 11, 2025
Copy link

coderabbitai bot commented Feb 11, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ycsh-w
Copy link

ycsh-w commented Feb 19, 2025

I felt like this might not be the only change needed to get this template back to work. For example, something like what's mentioned here should be done (i.e. let Coolify proxy know it shall work on 8080 not 80). I played with it for an hour today but still not able to get a fresh installation to work. Would love some more expertise here.

@stewnight
Copy link
Author

stewnight commented Feb 19, 2025

Hey @ycsh-w thank's for pointing that out. I think my testing wasn't valid as I was using the one-click deployment and then change the yaml file. But you were correct, try this out:

# documentation: https://help.penpot.app/technical-guide/getting-started/#install-with-docker
# slogan: Penpot is the first Open Source design and prototyping platform for product teams.
# tags: penpot,design,prototyping,figma,open,source
# logo: svgs/penpot.svg
# port: 8080
services:
  frontend:
    image: penpotapp/frontend:latest
    volumes:
      - penpot-assets:/opt/data/assets
    depends_on:
      penpot-backend:
        condition: service_healthy
      penpot-exporter:
        condition: service_healthy
    environment:
      - SERVICE_FQDN_FRONTEND_8080
      - PENPOT_FLAGS=${PENPOT_FRONTEND_FLAGS:-enable-login-with-password}
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:8080']
      interval: 2s
      timeout: 10s
      retries: 15

  penpot-backend:
    image: penpotapp/backend:latest
    volumes:
      - penpot-assets:/opt/data/assets
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    environment:
      - PENPOT_FLAGS=${PENPOT_BACKEND_FLAGS:-enable-login-with-password enable-smtp enable-prepl-server}
      - PENPOT_HTTP_SERVER_PORT=6060
      - PENPOT_SECRET_KEY=$SERVICE_REALBASE64_64_PENPOT
      - PENPOT_PUBLIC_URI=$SERVICE_FQDN_FRONTEND_8080
      - PENPOT_BACKEND_URI=http://penpot-backend
      - PENPOT_EXPORTER_URI=http://penpot-exporter
      - PENPOT_DATABASE_URI=postgresql://postgres/${POSTGRES_DB:-penpot}
      - PENPOT_DATABASE_USERNAME=${SERVICE_USER_POSTGRES}
      - PENPOT_DATABASE_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
      - PENPOT_REDIS_URI=redis://redis/0
      - PENPOT_ASSETS_STORAGE_BACKEND=assets-fs
      - PENPOT_STORAGE_ASSETS_FS_DIRECTORY=/opt/data/assets
      - PENPOT_TELEMETRY_ENABLED=${PENPOT_TELEMETRY_ENABLED:-false}
      - PENPOT_SMTP_DEFAULT_FROM=${PENPOT_SMTP_DEFAULT_FROM:-no-reply@example.com}
      - PENPOT_SMTP_DEFAULT_REPLY_TO=${PENPOT_SMTP_DEFAULT_REPLY_TO:-no-reply@example.com}
      - PENPOT_SMTP_HOST=${PENPOT_SMTP_HOST:-mailpit}
      - PENPOT_SMTP_PORT=${PENPOT_SMTP_PORT:-1025}
      - PENPOT_SMTP_USERNAME=${PENPOT_SMTP_USERNAME:-penpot}
      - PENPOT_SMTP_PASSWORD=${PENPOT_SMTP_PASSWORD:-penpot}
      - PENPOT_SMTP_TLS=${PENPOT_SMTP_TLS:-false}
      - PENPOT_SMTP_SSL=${PENPOT_SMTP_SSL:-false}
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:6060/readyz']
      interval: 10s
      timeout: 30s
      retries: 15

  penpot-exporter:
    image: penpotapp/exporter:latest
    environment:
      - PENPOT_PUBLIC_URI=$SERVICE_FQDN_FRONTEND_8080
      - PENPOT_REDIS_URI=redis://redis/0
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://127.0.0.1:6061/readyz']
      interval: 2s
      timeout: 10s
      retries: 15

  mailpit:
    image: axllent/mailpit:latest
    environment:
      - SERVICE_FQDN_MAILPIT_8025
    healthcheck:
      test: ['CMD', '/mailpit', 'readyz']
      interval: 5s
      timeout: 20s
      retries: 10

  postgres:
    image: postgres:15
    volumes:
      - penpot-postgresql-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_INITDB_ARGS=--data-checksums
      - POSTGRES_USER=$SERVICE_USER_POSTGRES
      - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
      - POSTGRES_DB=${POSTGRES_DB:-penpot}
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
      interval: 5s
      timeout: 20s
      retries: 10

  redis:
    image: redis:7-alpine
    command: redis-server --appendonly yes
    volumes:
      - penpot-redis-data:/data
    healthcheck:
      test: ['CMD', 'redis-cli', 'ping']
      interval: 5s
      timeout: 20s
      retries: 10

I also extended the backend health check as it takes a while for the migrations to load for the first time running it. Depending on your server if it fails the first time, just check the backend logs to ensure migrations have completed and then restart it again.

…lth check on backend due to migrations timing it out previously
@peaklabs-dev
Copy link
Member

Seems to be working, Thanks for the PR.

@peaklabs-dev peaklabs-dev merged commit d2032b0 into coollabsio:next Feb 24, 2025
1 check passed
@github-actions github-actions bot removed the ⚙️ Service Issues requesting or PRs adding/fixing service templates. label Feb 24, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants