Operations grimoire/Penpot: Difference between revisions
From Nasqueron Agora
No edit summary |
(rm /srv/penpot/public/version.txt) |
||
Line 24: | Line 24: | ||
# Pull the images <code>penpotapp/exporter</code>, <code>penpotapp/frontend</code> and <code>penpotapp/backend</code> | # Pull the images <code>penpotapp/exporter</code>, <code>penpotapp/frontend</code> and <code>penpotapp/backend</code> | ||
# Delete the file Salt uses to know front-end is deployed: <code>rm /srv/penpot/public/version.txt</code> | |||
# Deploy the service with <code>deploy_container penpot_exporter</code> and <code>deploy-container penpot_web</code> | # Deploy the service with <code>deploy_container penpot_exporter</code> and <code>deploy-container penpot_web</code> | ||
Revision as of 00:06, 18 January 2024
Penpot allows to experiment with UX, design and prototypes. It's hosted on our Docker PaaS.
This is a product under evaluation, feedback can be added to T1703.
Howto
Upgrade
There are two things to know:
- We pull 3 images, run 2 of them as container, the last one - frontend - is only used to copy resources to our main nginx
- The frontend and backend versions must match
Step 1 - Front-end preparation
First step is to update front-end at https://artifacts.nasqueron.org/penpot/penpot.tar.gz
On Dwellers:
- Pull the front-end image:
docker pull penpotapp/frontend
- Spawn a new container with
docker run --rm -it penpotapp/frontend bash
- Archive the /var/www/app folder:
cd /var/www && tar czf penpot.tar.gz app/
- Copy it to the artifacts.nasqueron.org penpot folder:
docker cp <penpot container>:/var/www/penpot.tar.gz /srv/artifacts/penpot/
Step 2 - Back-end and exporter
On docker-002:
- Pull the images
penpotapp/exporter
,penpotapp/frontend
andpenpotapp/backend
- Delete the file Salt uses to know front-end is deployed:
rm /srv/penpot/public/version.txt
- Deploy the service with
deploy_container penpot_exporter
anddeploy-container penpot_web
To check migrations
On docker-002, you should wee with docker logs penpot_web
something like:
[2024-01-17 23:50:57.865] I app.db - hint="initialize connection pool", name="main", uri="postgresql://penpot_db/penpot", read-only=false, with-credentials=true, min-size=0, max-size=60
[2024-01-17 23:50:57.892] I app.migrations - hint="running migrations", module=:app.migrations/migrations
[2024-01-17 23:50:58.123] I app.util.migrations - action="apply migration", module="main", name="0102-mod-access-token-table"
[2024-01-17 23:50:58.180] I app.util.migrations - action="apply migration", module="main", name="0103-mod-file-object-thumbnail-table"
[2024-01-17 23:50:58.345] I app.util.migrations - action="apply migration", module="main", name="0104-mod-file-thumbnail-table"
[2024-01-17 23:50:58.349] I app.util.migrations - action="apply migration", module="main", name="0105-mod-server-error-report-table"
Troubleshoot
PostgreSQL
You can open a PostgreSQL console with docker exec -it penpot_db psql -U penpot
.
Front-end vs back-end version
Versions for back-end and front-end need to match, especially as Penpot is developed with a rather fast pace.
- Front-end: `cat /srv/penpot/public/version.txt`
- Back-end: `docker exec penpot_web cat version.txt`