diff --git a/scripts/self-hosted/db.sql b/scripts/self-hosted/db.sql index 5711411..69d7b11 100644 --- a/scripts/self-hosted/db.sql +++ b/scripts/self-hosted/db.sql @@ -1106,8 +1106,8 @@ COPY public.customers (id, billable_type, billable_id, paddle_id, name, email, t -- COPY public.deployments (id, team_id, service_id, data, created_at, updated_at) FROM stdin; -1 1 1 {"processes": [{"name": "svc", "caddy": [], "ports": [{"targetPort": 80, "publishedPort": 80}, {"targetPort": 443, "publishedPort": 443}, {"targetPort": 2019, "publishedPort": 2019}], "backups": [], "command": "sh /start.sh", "envVars": [{"name": "CADDY_ADMIN", "value": "0.0.0.0:2019"}], "fastCgi": null, "volumes": [{"id": "volume-ouuJvb56dLB", "name": "data", "path": "/data", "dockerName": "svc_1_caddy_svc_data", "backupSchedule": null}, {"id": "volume-QSiRo0xeOoO", "name": "config", "path": "/config", "dockerName": "svc_1_caddy_svc_config", "backupSchedule": null}], "workers": [], "replicas": 1, "dockerName": "svc_1_caddy_svc", "launchMode": "daemon", "secretVars": {"vars": [], "dockerName": null}, "configFiles": [{"path": "/ptah/caddy/tls/.keep", "content": "# Keep this file", "dockerName": "svc_1_caddy_svc_dpl_1_cfg_ptah_caddy_tls_keep"}, {"path": "/start.sh", "content": "# This is the entrypoint for Caddy.\\n# By default, it starts with a blank Caddyfile with a standard \\"Hello from Caddy\\" page.\\n\\nif [ -f \\"/config/caddy/autosave.json\\" ]; then\\n echo \\"Starting with autosave.json\\"\\n\\n caddy run --config \\"/config/caddy/autosave.json\\"\\nelse\\n echo \\"Starting with the default Caddyfile\\"\\n\\n caddy run --config \\"/etc/caddy/Caddyfile\\"\\nfi", "dockerName": "svc_1_caddy_svc_dpl_1_cfg_start_sh"}], "dockerImage": "caddy:2.8-alpine", "secretFiles": [], "backupVolume": {"id": "backups-ZXP1qnTGWcl", "name": "backups", "path": "/ptah/backups", "dockerName": "svc_1_caddy_svc_ptah_backups"}, "redirectRules": [], "releaseCommand": {"command": null, "dockerName": null}, "dockerRegistryId": null}], "networkName": "ptah_net", "internalDomain": "caddy.ptah.local", "placementNodeId": 1} 2024-09-01 00:00:00 2024-09-01 00:00:00 -2 1 2 {"processes": [{"name": "pg", "caddy": [], "ports": [], "backups": [], "command": null, "envVars": [{"name": "POSTGRESQL_USERNAME", "value": "ptah_sh"}, {"name": "POSTGRESQL_PASSWORD", "value": "ptah_sh"}, {"name": "POSTGRESQL_DATABASE", "value": "ptah_sh"}], "fastCgi": null, "volumes": [{"id": "volume-uNuLJefAb8T", "name": "data", "path": "/bitnami/postgresql", "dockerName": "svc_2_ptah_pg_data", "backupSchedule": null}], "workers": [], "replicas": 1, "dockerName": "svc_2_ptah_pg", "launchMode": "daemon", "secretVars": {"vars": [], "dockerName": null}, "configFiles": [], "dockerImage": "bitnami/postgresql:16", "secretFiles": [], "backupVolume": {"id": "backups-mJWu9M3QwRv", "name": "backups", "path": "/ptah/backups", "dockerName": "svc_2_ptah_pg_ptah_backups"}, "redirectRules": [], "releaseCommand": {"command": null, "dockerName": null}, "dockerRegistryId": null}, {"name": "pool", "caddy": [], "ports": [], "backups": [], "command": null, "envVars": [{"name": "PGBOUNCER_POOL_MODE", "value": "session"}, {"name": "POSTGRESQL_USERNAME", "value": "ptah_sh"}, {"name": "POSTGRESQL_PASSWORD", "value": "ptah_sh"}, {"name": "POSTGRESQL_DATABASE", "value": "ptah_sh"}, {"name": "POSTGRESQL_HOST", "value": "pg.server.ptah.local"}, {"name": "PGBOUNCER_PORT", "value": "5432"}, {"name": "PGBOUNCER_DATABASE", "value": "ptah_sh"}], "fastCgi": null, "volumes": [{"id": "volume-j3s1xUoc99q", "name": "data", "path": "/bitnami/postgresql", "dockerName": "svc_2_ptah_pool_data", "backupSchedule": null}], "workers": [], "replicas": 1, "dockerName": "svc_2_ptah_pool", "launchMode": "daemon", "secretVars": {"vars": [], "dockerName": null}, "configFiles": [], "dockerImage": "bitnami/pgbouncer", "secretFiles": [], "backupVolume": {"id": "backups-wPYKkHWsqJF", "name": "backups", "path": "/ptah/backups", "dockerName": "svc_2_ptah_pool_ptah_backups"}, "redirectRules": [], "releaseCommand": {"command": null, "dockerName": null}, "dockerRegistryId": null}, {"name": "app", "caddy": [{"id": "caddy-P5dzPPiddBg", "path": "/*", "domain": "ptah.localhost", "targetPort": 8080, "publishedPort": 80, "targetProtocol": "http"}], "ports": [], "backups": [], "command": null, "envVars": [{"name": "APP_ENV", "value": "production"}, {"name": "APP_KEY", "value": "base64:APP_KEY"}, {"name": "BCRYPT_ROUNDS", "value": "12"}, {"name": "DB_CONNECTION", "value": "pgsql"}, {"name": "DB_HOST", "value": "pool.server.ptah.local"}, {"name": "DB_DATABASE", "value": "ptah_sh"}, {"name": "DB_USERNAME", "value": "ptah_sh"}, {"name": "DB_PASSWORD", "value": "ptah_sh"}, {"name": "LOG_CHANNEL", "value": "errorlog"}, {"name": "APP_URL", "value": "localhost"}, {"name": "BILLING_ENABLED", "value": "false"}], "fastCgi": null, "volumes": [], "workers": [{"name": "schedule", "command": "php artisan config:cache && php artisan schedule:work", "replicas": 1, "dockerName": "svc_2_ptah_app_wkr_schedule"}, {"name": "queue", "command": "php artisan config:cache && php artisan queue:work", "replicas": 1, "dockerName": "svc_2_ptah_app_wkr_queue"}], "replicas": 2, "dockerName": "svc_2_ptah_app", "launchMode": "daemon", "secretVars": {"vars": [], "dockerName": null}, "configFiles": [], "dockerImage": "ghcr.io/ptah-sh/ptah-server:v0.22.8", "secretFiles": [], "backupVolume": null, "redirectRules": [], "releaseCommand": {"command": "php artisan config:cache && php artisan migrate --no-interaction --verbose --ansi --force", "dockerName": "svc_2_dpl_2_release_command"}, "dockerRegistryId": null}], "networkName": "ptah_net", "internalDomain": "server.ptah.local", "placementNodeId": 1} 2024-09-01 00:00:00 2024-09-01 00:00:00 +1 1 1 {"processes": [{"name": "svc", "caddy": [], "ports": [{"targetPort": 80, "publishedPort": 80}, {"targetPort": 443, "publishedPort": 443}, {"targetPort": 2019, "publishedPort": 2019}], "backups": [], "command": "sh /start.sh", "envVars": [{"name": "CADDY_ADMIN", "value": "0.0.0.0:2019"}], "fastCgi": null, "volumes": [{"id": "volume-z83p9TPsl9x", "name": "data", "path": "/data", "dockerName": "svc_1_caddy_svc_data", "backupSchedule": null}, {"id": "volume-jcDE0XZha5k", "name": "config", "path": "/config", "dockerName": "svc_1_caddy_svc_config", "backupSchedule": null}], "workers": [], "replicas": 1, "dockerName": "svc_1_caddy_svc", "launchMode": "daemon", "secretVars": {"vars": [], "dockerName": null}, "configFiles": [{"path": "/ptah/caddy/tls/.keep", "content": "# Keep this file", "dockerName": "svc_1_caddy_svc_dpl_1_cfg_ptah_caddy_tls_keep"}, {"path": "/start.sh", "content": "# This is the entrypoint for Caddy.\\n# By default, it starts with a blank Caddyfile with a standard \\"Hello from Caddy\\" page.\\n\\nif [ -f \\"/config/caddy/autosave.json\\" ]; then\\n echo \\"Starting with autosave.json\\"\\n\\n caddy run --config \\"/config/caddy/autosave.json\\"\\nelse\\n echo \\"Starting with the default Caddyfile\\"\\n\\n caddy run --config \\"/etc/caddy/Caddyfile\\"\\nfi", "dockerName": "svc_1_caddy_svc_dpl_1_cfg_start_sh"}], "dockerImage": "caddy:2.8-alpine", "secretFiles": [], "backupVolume": {"id": "backups-Og8x6g93uBB", "name": "backups", "path": "/ptah/backups", "dockerName": "svc_1_caddy_svc_ptah_backups"}, "redirectRules": [], "releaseCommand": {"command": null, "dockerName": null}, "dockerRegistryId": null}], "networkName": "ptah_net", "internalDomain": "caddy.ptah.local", "placementNodeId": 1} 2024-09-01 00:00:00 2024-09-01 00:00:00 +2 1 2 {"processes": [{"name": "pg", "caddy": [], "ports": [], "backups": [], "command": null, "envVars": [{"name": "POSTGRESQL_USERNAME", "value": "ptah_sh"}, {"name": "POSTGRESQL_PASSWORD", "value": "ptah_sh"}, {"name": "POSTGRESQL_DATABASE", "value": "ptah_sh"}], "fastCgi": null, "volumes": [{"id": "volume-n2aymTqvnAY", "name": "data", "path": "/bitnami/postgresql", "dockerName": "svc_2_ptah_pg_data", "backupSchedule": null}], "workers": [], "replicas": 1, "dockerName": "svc_2_ptah_pg", "launchMode": "daemon", "secretVars": {"vars": [], "dockerName": null}, "configFiles": [], "dockerImage": "bitnami/postgresql:16", "secretFiles": [], "backupVolume": {"id": "backups-r34JsAhrs3o", "name": "backups", "path": "/ptah/backups", "dockerName": "svc_2_ptah_pg_ptah_backups"}, "redirectRules": [], "releaseCommand": {"command": null, "dockerName": null}, "dockerRegistryId": null}, {"name": "pool", "caddy": [], "ports": [], "backups": [], "command": null, "envVars": [{"name": "PGBOUNCER_POOL_MODE", "value": "session"}, {"name": "POSTGRESQL_USERNAME", "value": "ptah_sh"}, {"name": "POSTGRESQL_PASSWORD", "value": "ptah_sh"}, {"name": "POSTGRESQL_DATABASE", "value": "ptah_sh"}, {"name": "POSTGRESQL_HOST", "value": "pg.server.ptah.local"}, {"name": "PGBOUNCER_PORT", "value": "5432"}, {"name": "PGBOUNCER_DATABASE", "value": "ptah_sh"}], "fastCgi": null, "volumes": [{"id": "volume-DFwGfzT3M8I", "name": "data", "path": "/bitnami/postgresql", "dockerName": "svc_2_ptah_pool_data", "backupSchedule": null}], "workers": [], "replicas": 1, "dockerName": "svc_2_ptah_pool", "launchMode": "daemon", "secretVars": {"vars": [], "dockerName": null}, "configFiles": [], "dockerImage": "bitnami/pgbouncer", "secretFiles": [], "backupVolume": {"id": "backups-fVIm3bLJMfA", "name": "backups", "path": "/ptah/backups", "dockerName": "svc_2_ptah_pool_ptah_backups"}, "redirectRules": [], "releaseCommand": {"command": null, "dockerName": null}, "dockerRegistryId": null}, {"name": "app", "caddy": [{"id": "caddy-NEtU1TdlrLE", "path": "/*", "domain": "ptah.localhost", "targetPort": 8080, "publishedPort": 80, "targetProtocol": "http"}], "ports": [], "backups": [], "command": null, "envVars": [{"name": "APP_ENV", "value": "production"}, {"name": "APP_KEY", "value": "base64:APP_KEY"}, {"name": "BCRYPT_ROUNDS", "value": "12"}, {"name": "DB_CONNECTION", "value": "pgsql"}, {"name": "DB_HOST", "value": "pool.server.ptah.local"}, {"name": "DB_DATABASE", "value": "ptah_sh"}, {"name": "DB_USERNAME", "value": "ptah_sh"}, {"name": "DB_PASSWORD", "value": "ptah_sh"}, {"name": "LOG_CHANNEL", "value": "errorlog"}, {"name": "APP_URL", "value": "localhost"}, {"name": "BILLING_ENABLED", "value": "false"}], "fastCgi": null, "volumes": [], "workers": [{"name": "schedule", "command": "php artisan config:cache && php artisan schedule:work", "replicas": 1, "dockerName": "svc_2_ptah_app_wkr_schedule"}, {"name": "queue", "command": "php artisan config:cache && php artisan queue:work", "replicas": 1, "dockerName": "svc_2_ptah_app_wkr_queue"}], "replicas": 2, "dockerName": "svc_2_ptah_app", "launchMode": "daemon", "secretVars": {"vars": [], "dockerName": null}, "configFiles": [], "dockerImage": "ghcr.io/ptah-sh/ptah-server:v0.22.8", "secretFiles": [], "backupVolume": null, "redirectRules": [], "releaseCommand": {"command": "php artisan config:cache && php artisan migrate --no-interaction --verbose --ansi --force", "dockerName": "svc_2_dpl_2_release_command"}, "dockerRegistryId": null}], "networkName": "ptah_net", "internalDomain": "server.ptah.local", "placementNodeId": 1} 2024-09-01 00:00:00 2024-09-01 00:00:00 \. @@ -1222,14 +1222,14 @@ COPY public.node_tasks (id, team_id, task_group_id, type, meta, payload, status, 12 1 3 14 {"dockerImage": "ghcr.io/ptah-sh/ptah-server:v0.22.8"} {"Image": "ghcr.io/ptah-sh/ptah-server:v0.22.8", "PullOptions": {}, "AuthConfigName": ""} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 4 1 2 2 {"hash": "ac953927ad31a333b3a326a74baf428f", "path": "/ptah/caddy/tls/.keep", "processName": "svc_1_caddy_svc", "deploymentId": 1} {"SwarmConfigSpec": {"Data": "IyBLZWVwIHRoaXMgZmlsZQ==", "Name": "svc_1_caddy_svc_dpl_1_cfg_ptah_caddy_tls_keep", "Labels": {"sh.ptah.kind": "config", "sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.content.hash": "ac953927ad31a333b3a326a74baf428f", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 5 1 2 2 {"hash": "7b19b2f4fc26c6e51ad2f6bc3a8b1670", "path": "/start.sh", "processName": "svc_1_caddy_svc", "deploymentId": 1} {"SwarmConfigSpec": {"Data": "IyBUaGlzIGlzIHRoZSBlbnRyeXBvaW50IGZvciBDYWRkeS4KIyBCeSBkZWZhdWx0LCBpdCBzdGFydHMgd2l0aCBhIGJsYW5rIENhZGR5ZmlsZSB3aXRoIGEgc3RhbmRhcmQgIkhlbGxvIGZyb20gQ2FkZHkiIHBhZ2UuCgppZiBbIC1mICIvY29uZmlnL2NhZGR5L2F1dG9zYXZlLmpzb24iIF07IHRoZW4KICAgIGVjaG8gIlN0YXJ0aW5nIHdpdGggYXV0b3NhdmUuanNvbiIKCiAgICBjYWRkeSBydW4gLS1jb25maWcgIi9jb25maWcvY2FkZHkvYXV0b3NhdmUuanNvbiIKZWxzZQogICAgZWNobyAiU3RhcnRpbmcgd2l0aCB0aGUgZGVmYXVsdCBDYWRkeWZpbGUiCgogICAgY2FkZHkgcnVuIC0tY29uZmlnICIvZXRjL2NhZGR5L0NhZGR5ZmlsZSIKZmk=", "Name": "svc_1_caddy_svc_dpl_1_cfg_start_sh", "Labels": {"sh.ptah.kind": "config", "sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.content.hash": "7b19b2f4fc26c6e51ad2f6bc3a8b1670", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 -9 1 3 4 {"serviceId": 2, "dockerName": "svc_2_ptah_pg", "serviceName": "ptah", "deploymentId": 2} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {"Command": "", "ConfigName": "", "ConfigLabels": {}}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 1}}, "Name": "svc_2_ptah_pg", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "EndpointSpec": {"Ports": []}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["pg.server.ptah.local"]}], "ContainerSpec": {"Env": ["POSTGRESQL_USERNAME=ptah_sh", "POSTGRESQL_PASSWORD=ptah_sh", "POSTGRESQL_DATABASE=ptah_sh", "PTAH_HOSTNAME=pg.server.ptah.local"], "Args": null, "Hosts": ["pg.server.ptah.local"], "Image": "bitnami/postgresql:16", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "Mounts": [{"Type": "volume", "Source": "svc_2_ptah_pg_data", "Target": "/bitnami/postgresql", "VolumeOptions": {"Labels": {"sh.ptah.id": "volume-uNuLJefAb8T", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}}, {"Type": "volume", "Source": "svc_2_ptah_pg_ptah_backups", "Target": "/ptah/backups", "VolumeOptions": {"Labels": {"sh.ptah.id": "backups-mJWu9M3QwRv", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}}], "Command": null, "Configs": [], "Secrets": [], "Hostname": "dpl-2.pg.server.ptah.local", "Placement": {"Constraints": ["node.labels.sh.ptah.node.id==1"]}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 -7 1 2 4 {"serviceId": 1, "dockerName": "svc_1_caddy_svc", "serviceName": "caddy", "deploymentId": 1} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {"Command": "", "ConfigName": "", "ConfigLabels": {}}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 1}}, "Name": "svc_1_caddy_svc", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}, "EndpointSpec": {"Ports": [{"Protocol": "tcp", "TargetPort": 80, "PublishMode": "ingress", "PublishedPort": 80}, {"Protocol": "tcp", "TargetPort": 443, "PublishMode": "ingress", "PublishedPort": 443}, {"Protocol": "tcp", "TargetPort": 2019, "PublishMode": "ingress", "PublishedPort": 2019}]}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["svc.caddy.ptah.local"]}], "ContainerSpec": {"Env": ["CADDY_ADMIN=0.0.0.0:2019", "PTAH_HOSTNAME=svc.caddy.ptah.local"], "Args": ["/start.sh"], "Hosts": ["svc.caddy.ptah.local"], "Image": "caddy:2.8-alpine", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}, "Mounts": [{"Type": "volume", "Source": "svc_1_caddy_svc_data", "Target": "/data", "VolumeOptions": {"Labels": {"sh.ptah.id": "volume-ouuJvb56dLB", "sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}}}, {"Type": "volume", "Source": "svc_1_caddy_svc_config", "Target": "/config", "VolumeOptions": {"Labels": {"sh.ptah.id": "volume-QSiRo0xeOoO", "sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}}}, {"Type": "volume", "Source": "svc_1_caddy_svc_ptah_backups", "Target": "/ptah/backups", "VolumeOptions": {"Labels": {"sh.ptah.id": "backups-ZXP1qnTGWcl", "sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}}}], "Command": ["sh"], "Configs": [{"File": {"GID": "0", "UID": "0", "Mode": 511, "Name": "/ptah/caddy/tls/.keep"}, "ConfigName": "svc_1_caddy_svc_dpl_1_cfg_ptah_caddy_tls_keep"}, {"File": {"GID": "0", "UID": "0", "Mode": 511, "Name": "/start.sh"}, "ConfigName": "svc_1_caddy_svc_dpl_1_cfg_start_sh"}], "Secrets": [], "Hostname": "dpl-1.svc.caddy.ptah.local", "Placement": {"Constraints": ["node.labels.sh.ptah.node.id==1"]}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 +9 1 3 4 {"serviceId": 2, "dockerName": "svc_2_ptah_pg", "serviceName": "ptah", "deploymentId": 2} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {"Command": "", "ConfigName": "", "ConfigLabels": {}}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 1}}, "Name": "svc_2_ptah_pg", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "EndpointSpec": {"Ports": []}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["pg.server.ptah.local"]}], "ContainerSpec": {"Env": ["POSTGRESQL_USERNAME=ptah_sh", "POSTGRESQL_PASSWORD=ptah_sh", "POSTGRESQL_DATABASE=ptah_sh", "PTAH_HOSTNAME=pg.server.ptah.local"], "Args": null, "Hosts": ["pg.server.ptah.local"], "Image": "bitnami/postgresql:16", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "Mounts": [{"Type": "volume", "Source": "svc_2_ptah_pg_data", "Target": "/bitnami/postgresql", "VolumeOptions": {"Labels": {"sh.ptah.id": "volume-n2aymTqvnAY", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}}, {"Type": "volume", "Source": "svc_2_ptah_pg_ptah_backups", "Target": "/ptah/backups", "VolumeOptions": {"Labels": {"sh.ptah.id": "backups-r34JsAhrs3o", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}}], "Command": null, "Configs": [], "Secrets": [], "Hostname": "dpl-2.pg.server.ptah.local", "Placement": {"Constraints": ["node.labels.sh.ptah.node.id==1"]}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 +7 1 2 4 {"serviceId": 1, "dockerName": "svc_1_caddy_svc", "serviceName": "caddy", "deploymentId": 1} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {"Command": "", "ConfigName": "", "ConfigLabels": {}}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 1}}, "Name": "svc_1_caddy_svc", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}, "EndpointSpec": {"Ports": [{"Protocol": "tcp", "TargetPort": 80, "PublishMode": "ingress", "PublishedPort": 80}, {"Protocol": "tcp", "TargetPort": 443, "PublishMode": "ingress", "PublishedPort": 443}, {"Protocol": "tcp", "TargetPort": 2019, "PublishMode": "ingress", "PublishedPort": 2019}]}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["svc.caddy.ptah.local"]}], "ContainerSpec": {"Env": ["CADDY_ADMIN=0.0.0.0:2019", "PTAH_HOSTNAME=svc.caddy.ptah.local"], "Args": ["/start.sh"], "Hosts": ["svc.caddy.ptah.local"], "Image": "caddy:2.8-alpine", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}, "Mounts": [{"Type": "volume", "Source": "svc_1_caddy_svc_data", "Target": "/data", "VolumeOptions": {"Labels": {"sh.ptah.id": "volume-z83p9TPsl9x", "sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}}}, {"Type": "volume", "Source": "svc_1_caddy_svc_config", "Target": "/config", "VolumeOptions": {"Labels": {"sh.ptah.id": "volume-jcDE0XZha5k", "sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}}}, {"Type": "volume", "Source": "svc_1_caddy_svc_ptah_backups", "Target": "/ptah/backups", "VolumeOptions": {"Labels": {"sh.ptah.id": "backups-Og8x6g93uBB", "sh.ptah.managed": "1", "sh.ptah.service.id": "1", "sh.ptah.service.slug": "caddy_happy_ptah_1", "sh.ptah.deployment.id": "1"}}}], "Command": ["sh"], "Configs": [{"File": {"GID": "0", "UID": "0", "Mode": 511, "Name": "/ptah/caddy/tls/.keep"}, "ConfigName": "svc_1_caddy_svc_dpl_1_cfg_ptah_caddy_tls_keep"}, {"File": {"GID": "0", "UID": "0", "Mode": 511, "Name": "/start.sh"}, "ConfigName": "svc_1_caddy_svc_dpl_1_cfg_start_sh"}], "Secrets": [], "Hostname": "dpl-1.svc.caddy.ptah.local", "Placement": {"Constraints": ["node.labels.sh.ptah.node.id==1"]}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 8 1 3 14 {"dockerImage": "bitnami/postgresql:16"} {"Image": "bitnami/postgresql:16", "PullOptions": {}, "AuthConfigName": ""} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 10 1 3 14 {"dockerImage": "bitnami/pgbouncer"} {"Image": "bitnami/pgbouncer", "PullOptions": {}, "AuthConfigName": ""} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 -11 1 3 4 {"serviceId": 2, "dockerName": "svc_2_ptah_pool", "serviceName": "ptah", "deploymentId": 2} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {"Command": "", "ConfigName": "", "ConfigLabels": {}}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 1}}, "Name": "svc_2_ptah_pool", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "EndpointSpec": {"Ports": []}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["pool.server.ptah.local"]}], "ContainerSpec": {"Env": ["PGBOUNCER_POOL_MODE=session", "POSTGRESQL_USERNAME=ptah_sh", "POSTGRESQL_PASSWORD=ptah_sh", "POSTGRESQL_DATABASE=ptah_sh", "POSTGRESQL_HOST=pg.server.ptah.local", "PGBOUNCER_PORT=5432", "PGBOUNCER_DATABASE=ptah_sh", "PTAH_HOSTNAME=pool.server.ptah.local"], "Args": null, "Hosts": ["pool.server.ptah.local"], "Image": "bitnami/pgbouncer", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "Mounts": [{"Type": "volume", "Source": "svc_2_ptah_pool_data", "Target": "/bitnami/postgresql", "VolumeOptions": {"Labels": {"sh.ptah.id": "volume-j3s1xUoc99q", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}}, {"Type": "volume", "Source": "svc_2_ptah_pool_ptah_backups", "Target": "/ptah/backups", "VolumeOptions": {"Labels": {"sh.ptah.id": "backups-wPYKkHWsqJF", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}}], "Command": null, "Configs": [], "Secrets": [], "Hostname": "dpl-2.pool.server.ptah.local", "Placement": {"Constraints": ["node.labels.sh.ptah.node.id==1"]}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 +11 1 3 4 {"serviceId": 2, "dockerName": "svc_2_ptah_pool", "serviceName": "ptah", "deploymentId": 2} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {"Command": "", "ConfigName": "", "ConfigLabels": {}}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 1}}, "Name": "svc_2_ptah_pool", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "EndpointSpec": {"Ports": []}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["pool.server.ptah.local"]}], "ContainerSpec": {"Env": ["PGBOUNCER_POOL_MODE=session", "POSTGRESQL_USERNAME=ptah_sh", "POSTGRESQL_PASSWORD=ptah_sh", "POSTGRESQL_DATABASE=ptah_sh", "POSTGRESQL_HOST=pg.server.ptah.local", "PGBOUNCER_PORT=5432", "PGBOUNCER_DATABASE=ptah_sh", "PTAH_HOSTNAME=pool.server.ptah.local"], "Args": null, "Hosts": ["pool.server.ptah.local"], "Image": "bitnami/pgbouncer", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "Mounts": [{"Type": "volume", "Source": "svc_2_ptah_pool_data", "Target": "/bitnami/postgresql", "VolumeOptions": {"Labels": {"sh.ptah.id": "volume-DFwGfzT3M8I", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}}, {"Type": "volume", "Source": "svc_2_ptah_pool_ptah_backups", "Target": "/ptah/backups", "VolumeOptions": {"Labels": {"sh.ptah.id": "backups-fVIm3bLJMfA", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}}], "Command": null, "Configs": [], "Secrets": [], "Hostname": "dpl-2.pool.server.ptah.local", "Placement": {"Constraints": ["node.labels.sh.ptah.node.id==1"]}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 14 1 3 4 {"serviceId": 2, "dockerName": "svc_2_ptah_app_wkr_schedule", "serviceName": "ptah", "deploymentId": 2} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 1}}, "Name": "svc_2_ptah_app_wkr_schedule", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "EndpointSpec": {"Ports": []}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["schedule.app.server.ptah.local"]}], "ContainerSpec": {"Env": ["APP_ENV=production", "APP_KEY=base64:APP_KEY", "BCRYPT_ROUNDS=12", "DB_CONNECTION=pgsql", "DB_HOST=pool.server.ptah.local", "DB_DATABASE=ptah_sh", "DB_USERNAME=ptah_sh", "DB_PASSWORD=ptah_sh", "LOG_CHANNEL=errorlog", "APP_URL=localhost", "BILLING_ENABLED=false"], "Args": ["php artisan config:cache && php artisan schedule:work"], "Hosts": ["schedule.app.server.ptah.local"], "Image": "ghcr.io/ptah-sh/ptah-server:v0.22.8", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "Mounts": [], "Command": ["sh", "-c"], "Configs": [], "Secrets": [], "Hostname": "dpl-2.schedule.app.server.ptah.local", "Placement": [], "HealthCheck": {"Test": ["NONE"]}}}, "UpdateConfig": {"Parallelism": 1}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 15 1 3 4 {"serviceId": 2, "dockerName": "svc_2_ptah_app_wkr_queue", "serviceName": "ptah", "deploymentId": 2} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 1}}, "Name": "svc_2_ptah_app_wkr_queue", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "EndpointSpec": {"Ports": []}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["queue.app.server.ptah.local"]}], "ContainerSpec": {"Env": ["APP_ENV=production", "APP_KEY=base64:APP_KEY", "BCRYPT_ROUNDS=12", "DB_CONNECTION=pgsql", "DB_HOST=pool.server.ptah.local", "DB_DATABASE=ptah_sh", "DB_USERNAME=ptah_sh", "DB_PASSWORD=ptah_sh", "LOG_CHANNEL=errorlog", "APP_URL=localhost", "BILLING_ENABLED=false"], "Args": ["php artisan config:cache && php artisan queue:work"], "Hosts": ["queue.app.server.ptah.local"], "Image": "ghcr.io/ptah-sh/ptah-server:v0.22.8", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "Mounts": [], "Command": ["sh", "-c"], "Configs": [], "Secrets": [], "Hostname": "dpl-2.queue.app.server.ptah.local", "Placement": [], "HealthCheck": {"Test": ["NONE"]}}}, "UpdateConfig": {"Parallelism": 1}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 -16 1 3 5 {"deploymentId": 2} {"caddy": {"apps": {"http": {"servers": {"listen_80": {"listen": ["0.0.0.0:80"], "routes": [{"match": [{"host": ["ptah.localhost"], "path": ["/*"]}], "handle": [{"handler": "reverse_proxy", "headers": {"request": {"set": {"X-Forwarded-Host": ["ptah.localhost"], "X-Forwarded-Port": ["80"], "X-Forwarded-Proto": ["http"], "X-Forwarded-Schema": ["http"]}}, "response": {"set": {"X-Powered-By": ["https://ptah.sh"], "X-Ptah-Rule-Id": ["caddy-P5dzPPiddBg"]}}}, "transport": {"protocol": "http"}, "upstreams": [{"dial": "app.server.ptah.local:8080"}]}]}, {"match": [{"host": ["*"], "path": ["/*"]}], "handle": [{"body": "\\n\\n
\\nThe requested URL was not found on this server.
\\n\\nPlease contact the server administrator if you believe this is an error.
\\n\\n Return to the Home Page\\nPowered by ptah.sh
\\n\\n", "handler": "static_response", "headers": {"Content-Type": ["text/html; charset=utf-8"], "X-Powered-By": ["https://ptah.sh"]}, "status_code": "404"}]}]}}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 +16 1 3 5 {"deploymentId": 2} {"caddy": {"apps": {"http": {"servers": {"listen_80": {"listen": ["0.0.0.0:80"], "routes": [{"match": [{"host": ["ptah.localhost"], "path": ["/*"]}], "handle": [{"handler": "reverse_proxy", "headers": {"request": {"set": {"X-Forwarded-Host": ["ptah.localhost"], "X-Forwarded-Port": ["80"], "X-Forwarded-Proto": ["http"], "X-Forwarded-Schema": ["http"]}}, "response": {"set": {"X-Powered-By": ["https://ptah.sh"], "X-Ptah-Rule-Id": ["caddy-NEtU1TdlrLE"]}}}, "transport": {"protocol": "http"}, "upstreams": [{"dial": "app.server.ptah.local:8080"}]}]}, {"match": [{"host": ["*"], "path": ["/*"]}], "handle": [{"body": "\\n\\n\\nThe requested URL was not found on this server.
\\n\\nPlease contact the server administrator if you believe this is an error.
\\n\\n Return to the Home Page\\nPowered by ptah.sh
\\n\\n", "handler": "static_response", "headers": {"Content-Type": ["text/html; charset=utf-8"], "X-Powered-By": ["https://ptah.sh"]}, "status_code": "404"}]}]}}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 13 1 3 4 {"serviceId": 2, "dockerName": "svc_2_ptah_app", "serviceName": "ptah", "deploymentId": 2} {"SecretVars": {}, "AuthConfigName": "", "ReleaseCommand": {"Command": "php artisan config:cache && php artisan migrate --no-interaction --verbose --ansi --force", "ConfigName": "svc_2_dpl_2_release_command", "ConfigLabels": {"sh.ptah.kind": "release-command", "sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}}, "SwarmServiceSpec": {"Mode": {"Replicated": {"Replicas": 2}}, "Name": "svc_2_ptah_app", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "EndpointSpec": {"Ports": []}, "TaskTemplate": {"Networks": [{"Target": "ptah_net", "Aliases": ["app.server.ptah.local"]}], "ContainerSpec": {"Env": ["APP_ENV=production", "APP_KEY=base64:APP_KEY", "BCRYPT_ROUNDS=12", "DB_CONNECTION=pgsql", "DB_HOST=pool.server.ptah.local", "DB_DATABASE=ptah_sh", "DB_USERNAME=ptah_sh", "DB_PASSWORD=ptah_sh", "LOG_CHANNEL=errorlog", "APP_URL=localhost", "BILLING_ENABLED=false", "PTAH_HOSTNAME=app.server.ptah.local"], "Args": null, "Hosts": ["app.server.ptah.local"], "Image": "ghcr.io/ptah-sh/ptah-server:v0.22.8", "Labels": {"sh.ptah.managed": "1", "sh.ptah.service.id": "2", "sh.ptah.service.slug": "ptah_happy_ptah_2", "sh.ptah.deployment.id": "2"}, "Mounts": [], "Command": null, "Configs": [], "Secrets": [], "Hostname": "dpl-2.app.server.ptah.local", "Placement": {"Constraints": ["node.labels.sh.ptah.node.id==1"]}}}}} completed 2024-09-01 00:00:00 2024-09-01 00:00:00 [] 2024-09-01 00:00:00 2024-09-01 00:00:00 \. @@ -1239,7 +1239,7 @@ COPY public.node_tasks (id, team_id, task_group_id, type, meta, payload, status, -- COPY public.nodes (id, team_id, name, agent_token, last_seen_at, created_at, updated_at, data, swarm_id) FROM stdin; -1 1 default JaGEUzHnApGP6ioyu4f1Et7fbMj0IZ21RSr4vWXrw9 \N 2024-09-01 00:00:00 2024-09-01 00:00:00 \N 1 +1 1 default 79ZEp7nf89ZMxf99QFKT58BwkD7WUURlf4ZNfG7bpp \N 2024-09-01 00:00:00 2024-09-01 00:00:00 \N 1 \. diff --git a/scripts/self-hosted/install-server.sh b/scripts/self-hosted/install-server.sh index 8a41d34..18e95b9 100755 --- a/scripts/self-hosted/install-server.sh +++ b/scripts/self-hosted/install-server.sh @@ -14,8 +14,108 @@ EOF # Get the directory of the current script SCRIPT_DIR="$(dirname "$0")" -# Source the core.sh script from the same directory -PTAH_COMPONENT_BANNER="$PTAH_COMPONENT_BANNER" source "$SCRIPT_DIR/core.sh" +#=== core.sh +# Color functions +blue() { echo -e "\033[1;34m$1\033[0m"; } +bold() { echo -e "\033[1m$1\033[0m"; } +yellow() { echo -e "\033[33m$1\033[0m"; } +cyan() { echo -e "\033[36m$1\033[0m"; } +gray() { echo -e "\033[90m$1\033[0m"; } +green() { echo -e "\033[1;32m$1\033[0m"; } +red() { echo -e "\033[1;31m$1\033[0m"; } +thin() { echo -e "\033[2m$1\033[0m"; } + +header() { + echo -e "\n$(blue "=== $1 ===")" +} + +help_text() { + echo "$(thin "$(gray "--- $1")")" +} + +# Header generated with http://www.kammerl.de/ascii/AsciiSignature.php +# Selected font - starwars + +blue "$(cat << EOF + +.______ .___________. ___ __ __ _______. __ __ +| _ \ | | / \ | | | | / || | | | +| |_) | \`---| |----\` / ^ \ | |__| | | (----\`| |__| | +| ___/ | | / /_\ \ | __ | \ \ | __ | +| | | | / _____ \ | | | | __ .----) | | | | | +| _| |__| /__/ \__\ |__| |__| (__)|_______/ |__| |__| +$(green "$PTAH_COMPONENT_BANNER") + + + +EOF +)" + +if [ "$(whoami)" != "root" ]; then + echo "$(red "ERROR: You should be root to run this script.")" + + exit 1 +fi + +OS_NAME=$(cat /etc/os-release | grep "^ID=" | cut -d= -f2) + +DRY_MODE=${DRY_MODE:-false} + +if [ -z "$SKIP_CORE_INSTALL" ]; then + case "$OS_NAME" in + ubuntu) + echo "$(green "Installing Ptah.sh for Ubuntu...")" + + PKG_UPDATE_REGISTRIES="apt-get update" + PKG_INSTALL="apt-get install -yq" + + export DEBIAN_FRONTEND=noninteractive + ;; + *) + echo "Unsupported OS: $OS_NAME" + echo "We currently support only Ubuntu." + exit 1 + ;; + esac + + ARCH=$(uname -m) + + case "$ARCH" in + x86_64) + ;; + *) + echo "$(red "Unsupported architecture: $ARCH")" + echo "$(red "We currently support only x86_64.")" + exit 1 + ;; + esac + + export DOCKER="docker" + + if [ "$DRY_MODE" = true ]; then + echo "$(yellow "DRY_MODE is enabled. We will not install anything.")" + + PKG_UPDATE_REGISTRIES="echo $PKG_UPDATE_REGISTRIES" + PKG_INSTALL="echo $PKG_INSTALL" + + export DOCKER="echo $DOCKER" + fi + + header "Install System Packages" + + $PKG_UPDATE_REGISTRIES + $PKG_INSTALL sudo curl unzip ca-certificates apache2-utils + + header "Install Docker" + help_text "installation script provided by Docker and available at https://get.docker.com/" + + curl -fsSL https://get.docker.com/ | sh + + curl -L https://github.com/ptah-sh/ptah-agent/releases/latest/download/ptah-agent-linux-x86_64.bin -o /tmp/ptah-agent + + chmod +x /tmp/ptah-agent +fi +#--- core.sh # Function to let user choose an IP address with styling choose_ip_address() { diff --git a/scripts/self-hosted/tasks.json b/scripts/self-hosted/tasks.json index a222473..1156025 100644 --- a/scripts/self-hosted/tasks.json +++ b/scripts/self-hosted/tasks.json @@ -32,7 +32,7 @@ { "id": 7, "type": 4, - "payload": "{\"SecretVars\": {}, \"AuthConfigName\": \"\", \"ReleaseCommand\": {\"Command\": \"\", \"ConfigName\": \"\", \"ConfigLabels\": {}}, \"SwarmServiceSpec\": {\"Mode\": {\"Replicated\": {\"Replicas\": 1}}, \"Name\": \"svc_1_caddy_svc\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}, \"EndpointSpec\": {\"Ports\": [{\"Protocol\": \"tcp\", \"TargetPort\": 80, \"PublishMode\": \"ingress\", \"PublishedPort\": 80}, {\"Protocol\": \"tcp\", \"TargetPort\": 443, \"PublishMode\": \"ingress\", \"PublishedPort\": 443}, {\"Protocol\": \"tcp\", \"TargetPort\": 2019, \"PublishMode\": \"ingress\", \"PublishedPort\": 2019}]}, \"TaskTemplate\": {\"Networks\": [{\"Target\": \"ptah_net\", \"Aliases\": [\"svc.caddy.ptah.local\"]}], \"ContainerSpec\": {\"Env\": [\"CADDY_ADMIN=0.0.0.0:2019\", \"PTAH_HOSTNAME=svc.caddy.ptah.local\"], \"Args\": [\"/start.sh\"], \"Hosts\": [\"svc.caddy.ptah.local\"], \"Image\": \"caddy:2.8-alpine\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}, \"Mounts\": [{\"Type\": \"volume\", \"Source\": \"svc_1_caddy_svc_data\", \"Target\": \"/data\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"volume-ouuJvb56dLB\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}}}, {\"Type\": \"volume\", \"Source\": \"svc_1_caddy_svc_config\", \"Target\": \"/config\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"volume-QSiRo0xeOoO\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}}}, {\"Type\": \"volume\", \"Source\": \"svc_1_caddy_svc_ptah_backups\", \"Target\": \"/ptah/backups\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"backups-ZXP1qnTGWcl\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}}}], \"Command\": [\"sh\"], \"Configs\": [{\"File\": {\"GID\": \"0\", \"UID\": \"0\", \"Mode\": 511, \"Name\": \"/ptah/caddy/tls/.keep\"}, \"ConfigName\": \"svc_1_caddy_svc_dpl_1_cfg_ptah_caddy_tls_keep\"}, {\"File\": {\"GID\": \"0\", \"UID\": \"0\", \"Mode\": 511, \"Name\": \"/start.sh\"}, \"ConfigName\": \"svc_1_caddy_svc_dpl_1_cfg_start_sh\"}], \"Secrets\": [], \"Hostname\": \"dpl-1.svc.caddy.ptah.local\", \"Placement\": {\"Constraints\": [\"node.labels.sh.ptah.node.id==1\"]}}}}}" + "payload": "{\"SecretVars\": {}, \"AuthConfigName\": \"\", \"ReleaseCommand\": {\"Command\": \"\", \"ConfigName\": \"\", \"ConfigLabels\": {}}, \"SwarmServiceSpec\": {\"Mode\": {\"Replicated\": {\"Replicas\": 1}}, \"Name\": \"svc_1_caddy_svc\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}, \"EndpointSpec\": {\"Ports\": [{\"Protocol\": \"tcp\", \"TargetPort\": 80, \"PublishMode\": \"ingress\", \"PublishedPort\": 80}, {\"Protocol\": \"tcp\", \"TargetPort\": 443, \"PublishMode\": \"ingress\", \"PublishedPort\": 443}, {\"Protocol\": \"tcp\", \"TargetPort\": 2019, \"PublishMode\": \"ingress\", \"PublishedPort\": 2019}]}, \"TaskTemplate\": {\"Networks\": [{\"Target\": \"ptah_net\", \"Aliases\": [\"svc.caddy.ptah.local\"]}], \"ContainerSpec\": {\"Env\": [\"CADDY_ADMIN=0.0.0.0:2019\", \"PTAH_HOSTNAME=svc.caddy.ptah.local\"], \"Args\": [\"/start.sh\"], \"Hosts\": [\"svc.caddy.ptah.local\"], \"Image\": \"caddy:2.8-alpine\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}, \"Mounts\": [{\"Type\": \"volume\", \"Source\": \"svc_1_caddy_svc_data\", \"Target\": \"/data\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"volume-z83p9TPsl9x\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}}}, {\"Type\": \"volume\", \"Source\": \"svc_1_caddy_svc_config\", \"Target\": \"/config\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"volume-jcDE0XZha5k\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}}}, {\"Type\": \"volume\", \"Source\": \"svc_1_caddy_svc_ptah_backups\", \"Target\": \"/ptah/backups\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"backups-Og8x6g93uBB\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"1\", \"sh.ptah.service.slug\": \"caddy_happy_ptah_1\", \"sh.ptah.deployment.id\": \"1\"}}}], \"Command\": [\"sh\"], \"Configs\": [{\"File\": {\"GID\": \"0\", \"UID\": \"0\", \"Mode\": 511, \"Name\": \"/ptah/caddy/tls/.keep\"}, \"ConfigName\": \"svc_1_caddy_svc_dpl_1_cfg_ptah_caddy_tls_keep\"}, {\"File\": {\"GID\": \"0\", \"UID\": \"0\", \"Mode\": 511, \"Name\": \"/start.sh\"}, \"ConfigName\": \"svc_1_caddy_svc_dpl_1_cfg_start_sh\"}], \"Secrets\": [], \"Hostname\": \"dpl-1.svc.caddy.ptah.local\", \"Placement\": {\"Constraints\": [\"node.labels.sh.ptah.node.id==1\"]}}}}}" }, { "id": 8, @@ -42,7 +42,7 @@ { "id": 9, "type": 4, - "payload": "{\"SecretVars\": {}, \"AuthConfigName\": \"\", \"ReleaseCommand\": {\"Command\": \"\", \"ConfigName\": \"\", \"ConfigLabels\": {}}, \"SwarmServiceSpec\": {\"Mode\": {\"Replicated\": {\"Replicas\": 1}}, \"Name\": \"svc_2_ptah_pg\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}, \"EndpointSpec\": {\"Ports\": []}, \"TaskTemplate\": {\"Networks\": [{\"Target\": \"ptah_net\", \"Aliases\": [\"pg.server.ptah.local\"]}], \"ContainerSpec\": {\"Env\": [\"POSTGRESQL_USERNAME=ptah_sh\", \"POSTGRESQL_PASSWORD=ptah_sh\", \"POSTGRESQL_DATABASE=ptah_sh\", \"PTAH_HOSTNAME=pg.server.ptah.local\"], \"Args\": null, \"Hosts\": [\"pg.server.ptah.local\"], \"Image\": \"bitnami/postgresql:16\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}, \"Mounts\": [{\"Type\": \"volume\", \"Source\": \"svc_2_ptah_pg_data\", \"Target\": \"/bitnami/postgresql\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"volume-uNuLJefAb8T\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}}}, {\"Type\": \"volume\", \"Source\": \"svc_2_ptah_pg_ptah_backups\", \"Target\": \"/ptah/backups\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"backups-mJWu9M3QwRv\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}}}], \"Command\": null, \"Configs\": [], \"Secrets\": [], \"Hostname\": \"dpl-2.pg.server.ptah.local\", \"Placement\": {\"Constraints\": [\"node.labels.sh.ptah.node.id==1\"]}}}}}" + "payload": "{\"SecretVars\": {}, \"AuthConfigName\": \"\", \"ReleaseCommand\": {\"Command\": \"\", \"ConfigName\": \"\", \"ConfigLabels\": {}}, \"SwarmServiceSpec\": {\"Mode\": {\"Replicated\": {\"Replicas\": 1}}, \"Name\": \"svc_2_ptah_pg\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}, \"EndpointSpec\": {\"Ports\": []}, \"TaskTemplate\": {\"Networks\": [{\"Target\": \"ptah_net\", \"Aliases\": [\"pg.server.ptah.local\"]}], \"ContainerSpec\": {\"Env\": [\"POSTGRESQL_USERNAME=ptah_sh\", \"POSTGRESQL_PASSWORD=ptah_sh\", \"POSTGRESQL_DATABASE=ptah_sh\", \"PTAH_HOSTNAME=pg.server.ptah.local\"], \"Args\": null, \"Hosts\": [\"pg.server.ptah.local\"], \"Image\": \"bitnami/postgresql:16\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}, \"Mounts\": [{\"Type\": \"volume\", \"Source\": \"svc_2_ptah_pg_data\", \"Target\": \"/bitnami/postgresql\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"volume-n2aymTqvnAY\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}}}, {\"Type\": \"volume\", \"Source\": \"svc_2_ptah_pg_ptah_backups\", \"Target\": \"/ptah/backups\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"backups-r34JsAhrs3o\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}}}], \"Command\": null, \"Configs\": [], \"Secrets\": [], \"Hostname\": \"dpl-2.pg.server.ptah.local\", \"Placement\": {\"Constraints\": [\"node.labels.sh.ptah.node.id==1\"]}}}}}" }, { "id": 10, @@ -52,7 +52,7 @@ { "id": 11, "type": 4, - "payload": "{\"SecretVars\": {}, \"AuthConfigName\": \"\", \"ReleaseCommand\": {\"Command\": \"\", \"ConfigName\": \"\", \"ConfigLabels\": {}}, \"SwarmServiceSpec\": {\"Mode\": {\"Replicated\": {\"Replicas\": 1}}, \"Name\": \"svc_2_ptah_pool\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}, \"EndpointSpec\": {\"Ports\": []}, \"TaskTemplate\": {\"Networks\": [{\"Target\": \"ptah_net\", \"Aliases\": [\"pool.server.ptah.local\"]}], \"ContainerSpec\": {\"Env\": [\"PGBOUNCER_POOL_MODE=session\", \"POSTGRESQL_USERNAME=ptah_sh\", \"POSTGRESQL_PASSWORD=ptah_sh\", \"POSTGRESQL_DATABASE=ptah_sh\", \"POSTGRESQL_HOST=pg.server.ptah.local\", \"PGBOUNCER_PORT=5432\", \"PGBOUNCER_DATABASE=ptah_sh\", \"PTAH_HOSTNAME=pool.server.ptah.local\"], \"Args\": null, \"Hosts\": [\"pool.server.ptah.local\"], \"Image\": \"bitnami/pgbouncer\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}, \"Mounts\": [{\"Type\": \"volume\", \"Source\": \"svc_2_ptah_pool_data\", \"Target\": \"/bitnami/postgresql\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"volume-j3s1xUoc99q\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}}}, {\"Type\": \"volume\", \"Source\": \"svc_2_ptah_pool_ptah_backups\", \"Target\": \"/ptah/backups\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"backups-wPYKkHWsqJF\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}}}], \"Command\": null, \"Configs\": [], \"Secrets\": [], \"Hostname\": \"dpl-2.pool.server.ptah.local\", \"Placement\": {\"Constraints\": [\"node.labels.sh.ptah.node.id==1\"]}}}}}" + "payload": "{\"SecretVars\": {}, \"AuthConfigName\": \"\", \"ReleaseCommand\": {\"Command\": \"\", \"ConfigName\": \"\", \"ConfigLabels\": {}}, \"SwarmServiceSpec\": {\"Mode\": {\"Replicated\": {\"Replicas\": 1}}, \"Name\": \"svc_2_ptah_pool\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}, \"EndpointSpec\": {\"Ports\": []}, \"TaskTemplate\": {\"Networks\": [{\"Target\": \"ptah_net\", \"Aliases\": [\"pool.server.ptah.local\"]}], \"ContainerSpec\": {\"Env\": [\"PGBOUNCER_POOL_MODE=session\", \"POSTGRESQL_USERNAME=ptah_sh\", \"POSTGRESQL_PASSWORD=ptah_sh\", \"POSTGRESQL_DATABASE=ptah_sh\", \"POSTGRESQL_HOST=pg.server.ptah.local\", \"PGBOUNCER_PORT=5432\", \"PGBOUNCER_DATABASE=ptah_sh\", \"PTAH_HOSTNAME=pool.server.ptah.local\"], \"Args\": null, \"Hosts\": [\"pool.server.ptah.local\"], \"Image\": \"bitnami/pgbouncer\", \"Labels\": {\"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}, \"Mounts\": [{\"Type\": \"volume\", \"Source\": \"svc_2_ptah_pool_data\", \"Target\": \"/bitnami/postgresql\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"volume-DFwGfzT3M8I\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}}}, {\"Type\": \"volume\", \"Source\": \"svc_2_ptah_pool_ptah_backups\", \"Target\": \"/ptah/backups\", \"VolumeOptions\": {\"Labels\": {\"sh.ptah.id\": \"backups-fVIm3bLJMfA\", \"sh.ptah.managed\": \"1\", \"sh.ptah.service.id\": \"2\", \"sh.ptah.service.slug\": \"ptah_happy_ptah_2\", \"sh.ptah.deployment.id\": \"2\"}}}], \"Command\": null, \"Configs\": [], \"Secrets\": [], \"Hostname\": \"dpl-2.pool.server.ptah.local\", \"Placement\": {\"Constraints\": [\"node.labels.sh.ptah.node.id==1\"]}}}}}" }, { "id": 12, @@ -77,6 +77,6 @@ { "id": 16, "type": 5, - "payload": "{\"caddy\": {\"apps\": {\"http\": {\"servers\": {\"listen_80\": {\"listen\": [\"0.0.0.0:80\"], \"routes\": [{\"match\": [{\"host\": [\"ptah.localhost\"], \"path\": [\"/*\"]}], \"handle\": [{\"handler\": \"reverse_proxy\", \"headers\": {\"request\": {\"set\": {\"X-Forwarded-Host\": [\"ptah.localhost\"], \"X-Forwarded-Port\": [\"80\"], \"X-Forwarded-Proto\": [\"http\"], \"X-Forwarded-Schema\": [\"http\"]}}, \"response\": {\"set\": {\"X-Powered-By\": [\"https://ptah.sh\"], \"X-Ptah-Rule-Id\": [\"caddy-P5dzPPiddBg\"]}}}, \"transport\": {\"protocol\": \"http\"}, \"upstreams\": [{\"dial\": \"app.server.ptah.local:8080\"}]}]}, {\"match\": [{\"host\": [\"*\"], \"path\": [\"/*\"]}], \"handle\": [{\"body\": \"\\n\\n\\nThe requested URL was not found on this server.
\\n\\nPlease contact the server administrator if you believe this is an error.
\\n\\n Return to the Home Page\\nPowered by ptah.sh
\\n\\n\", \"handler\": \"static_response\", \"headers\": {\"Content-Type\": [\"text/html; charset=utf-8\"], \"X-Powered-By\": [\"https://ptah.sh\"]}, \"status_code\": \"404\"}]}]}}}}}}" + "payload": "{\"caddy\": {\"apps\": {\"http\": {\"servers\": {\"listen_80\": {\"listen\": [\"0.0.0.0:80\"], \"routes\": [{\"match\": [{\"host\": [\"ptah.localhost\"], \"path\": [\"/*\"]}], \"handle\": [{\"handler\": \"reverse_proxy\", \"headers\": {\"request\": {\"set\": {\"X-Forwarded-Host\": [\"ptah.localhost\"], \"X-Forwarded-Port\": [\"80\"], \"X-Forwarded-Proto\": [\"http\"], \"X-Forwarded-Schema\": [\"http\"]}}, \"response\": {\"set\": {\"X-Powered-By\": [\"https://ptah.sh\"], \"X-Ptah-Rule-Id\": [\"caddy-NEtU1TdlrLE\"]}}}, \"transport\": {\"protocol\": \"http\"}, \"upstreams\": [{\"dial\": \"app.server.ptah.local:8080\"}]}]}, {\"match\": [{\"host\": [\"*\"], \"path\": [\"/*\"]}], \"handle\": [{\"body\": \"\\n\\n\\nThe requested URL was not found on this server.
\\n\\nPlease contact the server administrator if you believe this is an error.
\\n\\n Return to the Home Page\\nPowered by ptah.sh
\\n\\n\", \"handler\": \"static_response\", \"headers\": {\"Content-Type\": [\"text/html; charset=utf-8\"], \"X-Powered-By\": [\"https://ptah.sh\"]}, \"status_code\": \"404\"}]}]}}}}}}" } ]