{"id":463697,"date":"2025-06-17T21:00:45","date_gmt":"2025-06-17T21:00:45","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=463697"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=463697","title":{"rendered":"<span>Self-hosted URL shortener + Raycast<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442 \u0425\u0430\u0431\u0440!<\/p>\n<p>\u042f \u043e\u0431\u043e\u0436\u0430\u044e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 URL shortener. \u042d\u0442\u043e \u043a\u0430\u043a clck.ru, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0443\u0442\u0435\u043a\u0430\u044e\u0442. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u043c\u0435\u043d \u044f \u0442\u043e\u0436\u0435 \u043c\u043e\u0433\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 &#8212; hdla.cloud).<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/684d76ab324f0deba45fc3ef\" data-style=\"\" id=\"684d76ab324f0deba45fc3ef\" width=\"\"><\/div>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u043f\u0440\u043e\u0431\u0435\u0433\u0443\u0441\u044c \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 <a href=\"https:\/\/github.com\/SinTan1729\/chhoto-url\" rel=\"noopener noreferrer nofollow\">chhoto-url<\/a> &#8212; \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e self-hosted \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 Rust. \u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 <a href=\"https:\/\/raycast.com\/\" rel=\"noopener noreferrer nofollow\">Raycast<\/a> \u043f\u043e\u043a\u0430\u0436\u0443 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0430\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u0431\u044b\u043b\u043e blazingly fast \u26a1.<\/p>\n<p><em>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 SSH, Docker \u0438 Linux.<\/em><\/p>\n<hr\/>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 <strong>\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0432\u043e\u0435\u0439 VPS<\/strong> \u043f\u043e SSH (\u0443 \u043a\u043e\u0433\u043e \u043d\u0435\u0442, \u0432\u0437\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0443\u0433\u043b\u0438\u0432 &#171;\u0430\u0440\u0435\u043d\u0434\u0430 VPS&#187;):<\/p>\n<pre><code class=\"bash\">ssh root@&lt;ip \u0432\u0430\u0448\u0435\u0439 vps&gt;<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <strong>Docker<\/strong> \u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<pre><code class=\"bash\">bash &lt;(curl -sSL https:\/\/get.docker.com)<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f chhoto-url \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0435\u0451:<\/p>\n<pre><code class=\"bash\">mkdir chhoto-url &amp;&amp; cd chhoto-url<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 <code>vim<\/code> \u0438\u043b\u0438 <code>nano<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u043c <code>compose.yml<\/code>(\u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u043b\u0443\u0447\u0448\u0435 <code>nano<\/code>):<\/p>\n<pre><code class=\"bash\">vim compose.yml<\/code><\/pre>\n<pre><code class=\"yaml\">services:   chhoto-url:     image: sintan1729\/chhoto-url:latest     restart: unless-stopped     container_name: chhoto-url     environment:       - db_url=\/db\/urls.sqlite       - password=${CHHOTO_URL_PASSWORD}     volumes:       - .\/data\/:\/db<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c <code>.env<\/code> \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">vim .env<\/code><\/pre>\n<pre><code class=\"bash\">CHHOTO_URL_PASSWORD=\"&lt;\u0441\u044e\u0434\u0430 \u043f\u0438\u0448\u0435\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c&gt;\"<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430 <code>reverse-proxy<\/code> \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043a\u0443\u0441 \u0438 \u0446\u0432\u0435\u0442. \u0417\u043d\u0430\u0442\u043e\u043a\u0430\u043c \u0441 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f\u043c, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 <a href=\"https:\/\/traefik.io\/\" rel=\"noopener noreferrer nofollow\">traefik<\/a>.<\/p>\n<hr\/>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 <code>compose.yml<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"yaml\">services:   traefik:     image: traefik:v3.4     restart: always     container_name: traefik     user: \"0:0\"  # Run as root to access the acme.json file     ports:       - \"80:80\"       - \"443:443\"     volumes:       - \/var\/run\/docker.sock:\/var\/run\/docker.sock       - .\/traefik.toml:\/etc\/traefik\/traefik.toml       - .\/acme\/acme.json:\/acme\/acme.json   chhoto-url:     image: sintan1729\/chhoto-url:latest     restart: unless-stopped     container_name: chhoto-url     labels:       - traefik.enable=true       - traefik.http.routers.chhoto-url.rule=Host(`EXAMPLE.COM`)       - traefik.http.routers.chhoto-url.entrypoints=websecure       - traefik.http.routers.chhoto-url.tls.certresolver=letsencrypt       - traefik.http.services.chhoto-url.loadbalancer.server.port=4567       # HTTP to HTTPS redirect       - traefik.http.routers.chhoto-url-http.rule=Host(`EXAMPLE.COM`)       - traefik.http.routers.chhoto-url-http.entrypoints=web       - traefik.http.routers.chhoto-url-http.middlewares=redirect-to-https       - traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https     environment:       - db_url=\/db\/urls.sqlite       - password=${CHHOTO_URL_PASSWORD}     volumes:       - .\/data\/:\/db<\/code><\/pre>\n<p><strong>\u0412\u0430\u0436\u043d\u043e<\/strong> \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <code>EXAMPLE.COM<\/code> \u043d\u0430 <strong>\u0441\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d<\/strong> \u043a\u0430\u043a \u0432 <code>compose.yml<\/code>, \u0442\u0430\u043a \u0438 \u0432 <code>traefik.toml<\/code> (\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0433\u0430\u0439\u0434\u0430).<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c <code>traefik.toml<\/code>:<\/p>\n<pre><code class=\"bash\"># Entry Points [entryPoints]   [entryPoints.web]     address = \":80\"   [entryPoints.websecure]     address = \":443\"  # Provider for Docker [providers.docker]   endpoint = \"unix:\/\/\/var\/run\/docker.sock\"   exposedByDefault = false  # Certificate Resolvers [certificatesResolvers.letsencrypt.acme]   email = \"admin@EXAMPLE.COM\"   storage = \"\/acme\/acme.json\"   caServer = \"https:\/\/acme-v02.api.letsencrypt.org\/directory\"   keyType = \"EC256\"   [certificatesResolvers.letsencrypt.acme.httpChallenge]     entryPoint = \"web\"  # API and Dashboard (optional - remove if not needed) [api]   dashboard = false   insecure = false<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f <code>certbot<\/code>(\u043e\u043d \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e TLS):<\/p>\n<pre><code class=\"bash\">touch acme\/acme.json &amp;&amp; chmod 600 acme\/acme.json<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 <strong>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441<\/strong>:  <\/p>\n<pre><code class=\"bash\">docker compose up -d<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0434\u043e\u043c\u0435\u043d\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c (\u043f\u0430\u0440\u043e\u043b\u044c \u0442\u043e\u0442 \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432 <code>.env<\/code>) .<\/p>\n<hr\/>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441 Raycast \u043f\u0440\u043e\u0441\u0442\u043e <a href=\"https:\/\/www.raycast.com\/andrei_hudalla\/chhoto\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430<\/a>.<\/p>\n<p>\u041f\u0440\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/22d\/79f\/283\/22d79f283e57c8d4cb17fd02e9a06490.png\" alt=\"\u042d\u043a\u0440\u0430\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\" title=\"\u042d\u043a\u0440\u0430\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\" width=\"1762\" height=\"1150\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/22d\/79f\/283\/22d79f283e57c8d4cb17fd02e9a06490.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/22d\/79f\/283\/22d79f283e57c8d4cb17fd02e9a06490.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u042d\u043a\u0440\u0430\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u043e\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/paranoidPhantom\/cloud\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 GitHub<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/919354\/\"> https:\/\/habr.com\/ru\/articles\/919354\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442 \u0425\u0430\u0431\u0440!<\/p>\n<p>\u042f \u043e\u0431\u043e\u0436\u0430\u044e \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 URL shortener. \u042d\u0442\u043e \u043a\u0430\u043a clck.ru, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0443\u0442\u0435\u043a\u0430\u044e\u0442. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u043c\u0435\u043d \u044f \u0442\u043e\u0436\u0435 \u043c\u043e\u0433\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 &#8212; hdla.cloud).<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/684d76ab324f0deba45fc3ef\" data-style=\"\" id=\"684d76ab324f0deba45fc3ef\" width=\"\"><\/div>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u043f\u0440\u043e\u0431\u0435\u0433\u0443\u0441\u044c \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 <a href=\"https:\/\/github.com\/SinTan1729\/chhoto-url\" rel=\"noopener noreferrer nofollow\">chhoto-url<\/a> &#8212; \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e self-hosted \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 Rust. \u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 <a href=\"https:\/\/raycast.com\/\" rel=\"noopener noreferrer nofollow\">Raycast<\/a> \u043f\u043e\u043a\u0430\u0436\u0443 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0430\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u0431\u044b\u043b\u043e blazingly fast \u26a1.<\/p>\n<p><em>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 SSH, Docker \u0438 Linux.<\/em><\/p>\n<hr\/>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 <strong>\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0432\u043e\u0435\u0439 VPS<\/strong> \u043f\u043e SSH (\u0443 \u043a\u043e\u0433\u043e \u043d\u0435\u0442, \u0432\u0437\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0443\u0433\u043b\u0438\u0432 &#171;\u0430\u0440\u0435\u043d\u0434\u0430 VPS&#187;):<\/p>\n<pre><code class=\"bash\">ssh root@&lt;ip \u0432\u0430\u0448\u0435\u0439 vps&gt;<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c <strong>Docker<\/strong> \u0435\u0441\u043b\u0438 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<pre><code class=\"bash\">bash &lt;(curl -sSL https:\/\/get.docker.com)<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f chhoto-url \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0435\u0451:<\/p>\n<pre><code class=\"bash\">mkdir chhoto-url &amp;&amp; cd chhoto-url<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0447\u0435\u0440\u0435\u0437 <code>vim<\/code> \u0438\u043b\u0438 <code>nano<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u043c <code>compose.yml<\/code>(\u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u043b\u0443\u0447\u0448\u0435 <code>nano<\/code>):<\/p>\n<pre><code class=\"bash\">vim compose.yml<\/code><\/pre>\n<pre><code class=\"yaml\">services:   chhoto-url:     image: sintan1729\/chhoto-url:latest     restart: unless-stopped     container_name: chhoto-url     environment:       - db_url=\/db\/urls.sqlite       - password=${CHHOTO_URL_PASSWORD}     volumes:       - .\/data\/:\/db<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c <code>.env<\/code> \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">vim .env<\/code><\/pre>\n<pre><code class=\"bash\">CHHOTO_URL_PASSWORD=\"&lt;\u0441\u044e\u0434\u0430 \u043f\u0438\u0448\u0435\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c&gt;\"<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0430 <code>reverse-proxy<\/code> \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043a\u0443\u0441 \u0438 \u0446\u0432\u0435\u0442. \u0417\u043d\u0430\u0442\u043e\u043a\u0430\u043c \u0441 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u044f\u043c, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 <a href=\"https:\/\/traefik.io\/\" rel=\"noopener noreferrer nofollow\">traefik<\/a>.<\/p>\n<hr\/>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 <code>compose.yml<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"yaml\">services:   traefik:     image: traefik:v3.4     restart: always     container_name: traefik     user: \"0:0\"  # Run as root to access the acme.json file     ports:       - \"80:80\"       - \"443:443\"     volumes:       - \/var\/run\/docker.sock:\/var\/run\/docker.sock       - .\/traefik.toml:\/etc\/traefik\/traefik.toml       - .\/acme\/acme.json:\/acme\/acme.json   chhoto-url:     image: sintan1729\/chhoto-url:latest     restart: unless-stopped     container_name: chhoto-url     labels:       - traefik.enable=true       - traefik.http.routers.chhoto-url.rule=Host(`EXAMPLE.COM`)       - traefik.http.routers.chhoto-url.entrypoints=websecure       - traefik.http.routers.chhoto-url.tls.certresolver=letsencrypt       - traefik.http.services.chhoto-url.loadbalancer.server.port=4567       # HTTP to HTTPS redirect       - traefik.http.routers.chhoto-url-http.rule=Host(`EXAMPLE.COM`)       - traefik.http.routers.chhoto-url-http.entrypoints=web       - traefik.http.routers.chhoto-url-http.middlewares=redirect-to-https       - traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https     environment:       - db_url=\/db\/urls.sqlite       - password=${CHHOTO_URL_PASSWORD}     volumes:       - .\/data\/:\/db<\/code><\/pre>\n<p><strong>\u0412\u0430\u0436\u043d\u043e<\/strong> \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <code>EXAMPLE.COM<\/code> \u043d\u0430 <strong>\u0441\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d<\/strong> \u043a\u0430\u043a \u0432 <code>compose.yml<\/code>, \u0442\u0430\u043a \u0438 \u0432 <code>traefik.toml<\/code> (\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0433\u0430\u0439\u0434\u0430).<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c <code>traefik.toml<\/code>:<\/p>\n<pre><code class=\"bash\"># Entry Points [entryPoints]   [entryPoints.web]     address = \":80\"   [entryPoints.websecure]     address = \":443\"  # Provider for Docker [providers.docker]   endpoint = \"unix:\/\/\/var\/run\/docker.sock\"   exposedByDefault = false  # Certificate Resolvers [certificatesResolvers.letsencrypt.acme]   email = \"admin@EXAMPLE.COM\"   storage = \"\/acme\/acme.json\"   caServer = \"https:\/\/acme-v02.api.letsencrypt.org\/directory\"   keyType = \"EC256\"   [certificatesResolvers.letsencrypt.acme.httpChallenge]     entryPoint = \"web\"  # API and Dashboard (optional - remove if not needed) [api]   dashboard = false   insecure = false<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f <code>certbot<\/code>(\u043e\u043d \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e TLS):<\/p>\n<pre><code class=\"bash\">touch acme\/acme.json &amp;&amp; chmod 600 acme\/acme.json<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 <strong>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441<\/strong>:  <\/p>\n<pre><code class=\"bash\">docker compose up -d<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0434\u043e\u043c\u0435\u043d\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c (\u043f\u0430\u0440\u043e\u043b\u044c \u0442\u043e\u0442 \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u0432 <code>.env<\/code>) .<\/p>\n<hr\/>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441 Raycast \u043f\u0440\u043e\u0441\u0442\u043e <a href=\"https:\/\/www.raycast.com\/andrei_hudalla\/chhoto\" rel=\"noopener noreferrer nofollow\">\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430<\/a>.<\/p>\n<p>\u041f\u0440\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u042d\u043a\u0440\u0430\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<hr\/>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043c\u043e\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <a href=\"https:\/\/github.com\/paranoidPhantom\/cloud\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 GitHub<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/919354\/\"> https:\/\/habr.com\/ru\/articles\/919354\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-463697","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/463697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=463697"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/463697\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=463697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=463697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=463697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}