我已安装this repo 在我的Heroku应用程序中,您可以在此处看到:
https://ss-wp25856.herokuapp.com
按用户id:
不锈钢
和密码(如需查看或记录更多信息):
n6RF1TSNrNkA!%q%o%9R18Td
通过使用以下命令:
git clone https://github.com/elasa-Sites/wordpress-ja-pg4wp2-heroku
r=$RANDOM; echo $r
heroku create ss-wp$r --ssh-git --stack cedar-14
heroku addons:create heroku-postgresql:hobby-dev -a ss-wp$r # -a <app Name> which here ss-wp12 is appname
heroku addons:add sendgrid:starter -a ss-wp$r # -a <app Name> which here ss-wp@r is
heroku config:set AUTH_KEY=\'^%RH5z>.rM=9A+oH(6n,`+F99Z|3V@_ArpWy%{;+y|pFcCuKwl/<VP!#4oJ0+p2t\' \\
SECURE_AUTH_KEY=\'(<ofl_w;1k(tpsPF<].GW|p@rq|=0Mc<d~u[N8S!1C|{obdleN{+1&(;/mTTD0yh\' \\
LOGGED_IN_KEY=\'Thwf<)Ey^9EdtpxD?Z5TlO9-Pc|v)~La1BBRPk=Ey|%jPUc%A!SxVo6lxQ6uitK \' \\
NONCE_KEY=\'BNx YjS{|[jtE,eHXh.m0{F=86uW<92),uU8}Yk)dz)j@bXqj@mEt!q|^.HU-<<w\' \\
AUTH_SALT=\'y1CFU=<RNO5Y_Io-}aovd}L:o-I{HdNMrt/=RR peqTn/%_@#U3uD^~]=8#z(`a\' \\
SECURE_AUTH_SALT=\'Ez~bty^ZCop.RV_)&zVb3:U MeDx1+m>Yz@m#>M5wpIk|5hoRQ~Z&m`r mJd69(U\' \\
LOGGED_IN_SALT=\'~R]Xaq<WE-j9Bc-ggAhQZdE|p]q bBolv$]YXjIu:7P;/)WP}R3Ys,*>%4Eqv[,/\' \\
NONCE_SALT=\'KR~5 NWctd2l^f>(f9~oxhMT?I7JcTM]^>NEzKZL.U+9yc^2hZujh~PALNs$Vdua\' -a ss-wp$r # -a <app Name> which here ss-wp@r is
echo "USERNAME:CRYPT PASSWORD" > .htpasswd
git init
git add .
git remote add origin https://git.heroku.com/ss-wp$r.git
#git config user.name "someone"
#git config user.email "[email protected]"
git commit -am "start"
git checkout -b production
heroku git:remote -a ss-wp$r
#heroku stack:set heroku-18 --remote origin
git push heroku production:master
但问题是,在WordPress中安装的新插件被新的请求唤醒后,在几个小时内没有使用该应用程序,需要重新安装。您可以在此处看到:
以下是现在唤醒回购后的最后日志:
2019-12-05T21:44:51.535588+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=f11aa1f3-88ec-4a5a-b44d-21984d006eec fwd="2.182.123.165" dyno=web.1 connect=1ms service=91ms status=400 bytes=510 protocol=https
2019-12-05T21:44:51.530689+00:00 app[web.1]: 10.35.183.55 - - [05/Dec/2019:21:44:51 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:44:51.590658+00:00 app[web.1]: 10.45.241.211 - - [05/Dec/2019:21:44:51 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:44:51.584369+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=d4c4f14a-8c89-47e9-8abc-c0c0affa4f5b fwd="2.182.123.165" dyno=web.1 connect=1ms service=126ms status=400 bytes=510 protocol=https
2019-12-05T21:44:53.661743+00:00 heroku[router]: at=info method=GET path="/wp-admin/admin-ajax.php?action=updraft_ajax&subaction=activejobs_list&nonce=cdf0baf8ab&downloaders=" host=ss-wp25856.herokuapp.com request_id=d1655d36-ad84-4544-875b-933828b748e7 fwd="2.182.123.165" dyno=web.1 connect=1ms service=94ms status=400 bytes=407 protocol=https
2019-12-05T21:44:53.662881+00:00 app[web.1]: 10.35.183.55 - - [05/Dec/2019:21:44:53 +0000] "GET /wp-admin/admin-ajax.php?action=updraft_ajax&subaction=activejobs_list&nonce=cdf0baf8ab&downloaders= HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/options-general.php?page=updraftplus" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:44:55.513728+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=084effce-852e-4fb9-a573-b7b785cabfde fwd="2.182.123.165" dyno=web.1 connect=1ms service=73ms status=400 bytes=510 protocol=https
2019-12-05T21:44:55.535404+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=13276588-4e37-4c3a-a9d3-0a29015fa44a fwd="2.182.123.165" dyno=web.1 connect=1ms service=78ms status=400 bytes=510 protocol=https
2019-12-05T21:44:55.513166+00:00 app[web.1]: 10.35.183.55 - - [05/Dec/2019:21:44:55 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:44:55.533462+00:00 app[web.1]: 10.45.241.211 - - [05/Dec/2019:21:44:55 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:44:59.641359+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=fc32c0b4-4fe7-4c53-9c81-6554a6bc5bf8 fwd="212.103.48.115" dyno=web.1 connect=1ms service=160ms status=400 bytes=510 protocol=https
2019-12-05T21:44:59.675595+00:00 heroku[router]: at=info method=GET path="/wp-admin/admin-ajax.php?action=updraft_ajax&subaction=activejobs_list&nonce=cdf0baf8ab&downloaders=" host=ss-wp25856.herokuapp.com request_id=4eee086f-1741-4443-b776-fc7800185dfe fwd="212.103.48.115" dyno=web.1 connect=1ms service=156ms status=400 bytes=407 protocol=https
2019-12-05T21:44:59.675639+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=2ec7ab92-e3c7-4d6e-bd87-9a614a9fef7c fwd="212.103.48.115" dyno=web.1 connect=1ms service=171ms status=400 bytes=510 protocol=https
2019-12-05T21:44:59.639339+00:00 app[web.1]: 10.63.103.37 - - [05/Dec/2019:21:44:59 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:44:59.675355+00:00 app[web.1]: 10.9.213.124 - - [05/Dec/2019:21:44:59 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:44:59.682888+00:00 app[web.1]: 10.123.249.13 - - [05/Dec/2019:21:44:59 +0000] "GET /wp-admin/admin-ajax.php?action=updraft_ajax&subaction=activejobs_list&nonce=cdf0baf8ab&downloaders= HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/options-general.php?page=updraftplus" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:45:03.604846+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=3729fe16-e938-4725-b9fc-96d7b08a78fa fwd="212.103.48.115" dyno=web.1 connect=1ms service=147ms status=400 bytes=510 protocol=https
2019-12-05T21:45:03.575621+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=0934309b-f047-407c-a55e-e2135f8b61af fwd="212.103.48.115" dyno=web.1 connect=1ms service=91ms status=400 bytes=510 protocol=https
2019-12-05T21:45:03.578798+00:00 app[web.1]: 10.123.249.13 - - [05/Dec/2019:21:45:03 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:45:03.606606+00:00 app[web.1]: 10.63.103.37 - - [05/Dec/2019:21:45:03 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:45:05.612284+00:00 app[web.1]: 10.9.213.124 - - [05/Dec/2019:21:45:05 +0000] "GET /wp-admin/admin-ajax.php?action=updraft_ajax&subaction=activejobs_list&nonce=cdf0baf8ab&downloaders= HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/options-general.php?page=updraftplus" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:45:05.616701+00:00 heroku[router]: at=info method=GET path="/wp-admin/admin-ajax.php?action=updraft_ajax&subaction=activejobs_list&nonce=cdf0baf8ab&downloaders=" host=ss-wp25856.herokuapp.com request_id=f38872e3-7420-4834-b980-e6ba71bb9094 fwd="212.103.48.115" dyno=web.1 connect=3ms service=85ms status=400 bytes=407 protocol=https
2019-12-05T21:45:07.629102+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=94152c5d-8630-4f6c-bc22-8c38e57b5109 fwd="212.103.48.115" dyno=web.1 connect=1ms service=109ms status=400 bytes=510 protocol=https
2019-12-05T21:45:07.630826+00:00 app[web.1]: 10.123.249.13 - - [05/Dec/2019:21:45:07 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:45:08.603276+00:00 heroku[router]: at=info method=POST path="/wp-admin/admin-ajax.php" host=ss-wp25856.herokuapp.com request_id=aee81c91-f043-4af9-a89d-b85863aa4a0d fwd="212.103.48.115" dyno=web.1 connect=2ms service=99ms status=400 bytes=510 protocol=https
2019-12-05T21:45:08.604800+00:00 app[web.1]: 10.63.103.37 - - [05/Dec/2019:21:45:08 +0000] "POST /wp-admin/admin-ajax.php HTTP/1.1" 400 1 "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:45:09.557561+00:00 heroku[router]: at=info method=GET path="/wp-cron.php" host=ss-wp25856.herokuapp.com request_id=0fec7f9f-1ce3-4635-9b3f-dc472380cedd fwd="212.103.48.115" dyno=web.1 connect=1ms service=82ms status=200 bytes=150 protocol=https
2019-12-05T21:45:09.558427+00:00 app[web.1]: 10.9.213.124 - - [05/Dec/2019:21:45:09 +0000] "GET /wp-cron.php HTTP/1.1" 200 - "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:45:09.590081+00:00 app[web.1]: 10.123.249.13 - - [05/Dec/2019:21:45:09 +0000] "GET /wp-cron.php HTTP/1.1" 200 - "https://ss-wp25856.herokuapp.com/wp-admin/admin.php?page=WPvivid" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
2019-12-05T21:45:09.590005+00:00 heroku[router]: at=info method=GET path="/wp-cron.php" host=ss-wp25856.herokuapp.com request_id=12971149-d370-40bc-9544-e34ede8074cf fwd="212.103.48.115" dyno=web.1 connect=3ms service=105ms status=200 bytes=150 protocol=https
Autoscroll
根据这个问题:
https://stackoverflow.com/questions/59020673/why-do-my-app-on-heroku-restart-itself-after-sleeping-on-free-dyno-heroku-apps/59029388?noredirect=1#comment104356645_59029388, 答案是:
这听起来像是您的应用程序状态(我想这就是您所说的配置)在每次Dyno启动时都会被重置,因为使用的是临时文件系统,请参阅https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem 为了更好的解释。您还可以发现https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted 有用的基本上,当Dyno重新启动时,存储在硬盘上的任何数据都将无法保存(每次部署以及每24小时一次)。相反,您应该像Amason AWS S3那样使用云存储。
这是否意味着Heroku的默认设置将删除在睡眠和唤醒应用程序后添加到repo的所有新文件?
那么,如果这是真的,是否可以将所有数据和文件上传到GitHub(或您的建议)这样的新存储空间,以便在睡眠超时之前完成(大约30分钟无请求)?
我们可以使用:
heroku login
heroku git:clone -a <app-name>
cd <app-name>
heroku git:remote -a <app-name>
git pull heroku master
命令将所有应用程序文件抓取到另一台服务器或本地存储中,以保存添加到word press站点的新更改,然后进入睡眠状态并擦除这些数据,并在醒来后将其推送到主GitHub repo以上载到应用程序?
感谢您的关注。