gregmsanderson / fly-hello-wordpress Goto Github PK
View Code? Open in Web Editor NEWRun WordPress on Fly.io
License: MIT License
Run WordPress on Fly.io
License: MIT License
the comment in fly.toml
:
the default WordPress image listens on port 80, rather than the more common 8080
today I use the latest docker image FROM wordpress:6-php8.2-fpm-alpine
and run fly deploy
and found that
WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:
- 0.0.0.0:80
Found these processes inside the machine with open listening sockets:
PROCESS | ADDRESSES
--------------------------------------------------------*---------------------------------------
php-fpm: master process (/usr/local/etc/php-fpm.conf) | [::]:9000
/.fly/hallpass | [fdaa:2:cf76:a7b:18b:a017:8944:2]:22
php-fpm: pool www | [::]:9000
php-fpm: pool www | [::]:9000
I change internal_port = 80
to internal_port = 9000
and everything went well.
the 9000 the the php-fpm listens at, not the apache.
How to add .env to Dockerfile ? maybe can simple for setup
This seems like it should be simple, but Wordpress/PHP is not really my forte, and I’m having a hell of a time finding any good documentation for this. Since the README mentions that this was tested against PlanetScale, how did you actually get Wordpress to connect? I’m setting my environment variables as follows, but I keep getting database connection errors (it works just fine against a Google Cloud SQL MySQL database, but I’m trying to migrate it to PlanetScale). Based on what I can tell from the connection details provided for Django and others, it seems like I need to specify the CA root, but I cannot find a single example of how to do that for Wordpress.
-e WORDPRESS_DB_HOST='…' \
-e WORDPRESS_DB_USER='…' \
-e WORDPRESS_DB_PASSWORD='…' \
-e WORDPRESS_DB_NAME='…' \
-e WORDPRESS_CONFIG_EXTRA='define("MYSQL_CLIENT_FLAGS", MYSQLI_CLIENT_SSL);'
I use the free and default memory. After I deployed the wordpress apache docker, I received an email like this once a day
Hello! Your “xxx” application hosted on Fly.io crashed because it ran out of memory. Specifically, the instance 81857550a10598. Adding more RAM to your application might help!
You should know that adding RAM does cost money. Not much, but some. Figure about $5/mo per extra GB. Our docs have [complete pricing details](https://fly.io/docs/about/pricing/?utm_campaign=oom-notification&utm_medium=email&utm_source=flyio#virtual-machines).
When you’re ready, add more RAM by running this from the command line or the [Fly Web CLI](https://fly.io/terminal):
fly scale memory [memoryMB] -a xxx
(replace [memoryMB] with the amount of memory you want to use, in megabytes eg. 2048)
Here’s the raw log message:
Out of memory: Killed process 1272 (apache2) total-vm:322300kB, anon-rss:24052kB, file-rss:0kB, shmem-rss:34308kB, UID:33 pgtables:312kB oom_score_adj:0
the graph, while I was trying to restart the machine
just share this until I find some solution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.