https://geeknote.net/sai
sai
https://geeknote-storage.oss-cn-hongkong.aliyuncs.com/byry4yq4feapc3l0ynyqjdj91ngj?x-oss-process=image%2Fresize%2Cm_fill%2Cw_160%2Ch_160
2022-10-28T14:59:59Z
sai
https://geeknote.net/sai
https://geeknote.net/sai/posts/1292
2022-07-01T02:46:59Z
2022-10-28T14:59:59Z
fly.io的错误
<p><img src="/attachments/EMhEtCL1ZbF4fcf3CypNXoVA/WX20220701-105500.png" alt="WX20220701-105500.png"></p>
<h3>
<a id="%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98" href="#%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98" class="anchor"></a>遇到的问题</h3>
<ol>
<li>
</li>
</ol>
<pre class="highlight"><code>Step 26/47 : RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt apt-get update -qq && apt-get install --no-install-recommends -y ${DEV_PACKAGES} && rm -rf /var/lib/apt/lists /var/cache/apt/archives
DEBUG result image:<nil> error:error building: error rendering build status stream: the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
Error failed to fetch an image or build from source: error building: error rendering build status stream: the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
(待解决)
</code></pre>
<p>2.<img src="/attachments/GjqhxqNAWYPSDWVn4GdeVX4Z/1.png" alt="1.png"></p>
<p>toml ruby版本是3.1.1,自己.ruby_version是3.0.3,修改toml文件的ruby version</p>
<p>3.<img src="/attachments/waDZMQyxdWADJ7KLkqQPQBoY/2.png" alt="2.png"></p>
<p>部署完毕后命令行会输出 postgres 的管理员账号密码,可以就找个安全的地方记录一下。</p>
<p>是把数据库挂载到 web app,输入以下命令:</p>
<p>$ flyctl pg attach --postgres-app PG_APP_NAME --app WEB_APP_NAME
执行操作后,fly 会在 postgres 里面创建一个 database 和有对应读写权限的 dbuser,然后自动把连接信息设置到 web app 的环境变量 DATABASE_URL 内,所以这个变量不需要自己设置。
,再执行:
fly deploy --remote-only</p>
<p>4.登陆多个账号,有时候无法识别,需要重新flyctl auth login下?</p>
<p><img src="/attachments/2Ljet6jeCVTUjjurFEVg5B7Q/3.png" alt="3.png"></p>
<p>5.<img src="/attachments/8qZZLyLE3arsVFKgLjsk3xWM/5.png" alt="5.png"></p>
<p>把dockerfile那两行without给注释掉</p>
<p>6.<img src="/attachments/9J78VhUDz8k6dJPbBG3e5PKq/6.png" alt="6.png">
(待解决)</p>
<p>console:
<img src="/attachments/n32tDFqTrFkbKzSMqmHTTtCU/4.png" alt="4.png"></p>
遇到的问题
Step 26/47 : RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache...
sai
https://geeknote.net/sai
https://geeknote.net/sai/posts/1290
2022-06-30T06:45:50Z
2022-10-28T14:59:58Z
nohup 启动自动断掉,页面无法访问
<p>nohup启动后端和前端项目,页面过一段会突然502了,解决方法是用nohup启动后,需要再执行<code>exit</code>退出当前控制台</p>
nohup启动后端和前端项目,页面过一段会突然502了,解决方法是用nohup启动后,需要再执行exit退出当前控制台
sai
https://geeknote.net/sai