3 ms·
docker run -v $PWD:/app/public -p 443:443 \ dunglas/frankenphp If you want to build a docker container yourself that you can use to serve your app, then
by mg 2y ago
docker run -v $PWD:/app/public -p 443:443 \
dunglas/frankenphp
If you want to build a docker container yourself that you can use to serve your app, then running these commands should do the trick to turn a fresh Debian into the container you need:
apt install -y apache2 libapache2-mod-php
cat << 'EOF' > /etc/apache2/sites-enabled/000-default.conf
ServerName mysite.local
<Directory /app/public>
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot /app/public
</VirtualHost>
EOF
Friends and I maintain a repo which shows how to go from zero to a running web application via popular languages and frameworks here:
https://github.com/no-gravity/web_app_from_scratch https://github.com/no-gravity/web_app_from_scratch
- johnchristopher 2y agoUnless I am mistaken this won't work: does default apache 000-default.conf vhost redirect traffic from 443 to 80 ?
- mg 2y agoTo support SSL you would add a virtual host section like this: <VirtualHost *:443> ServerName mysite.local SSLEngine on SSLCertificateFile /path/to/cert SSLCertificateKeyFile /path/to/key DocumentRoot /app/public </VirtualHost> And either use a real cert or add a command to create a self signed one: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key -out cert
- lnxg33k1 2y agoI started working a month ago for a company using mod_php, it's painful, every time you start xdebug, then after the debugging session, you need to restart apache, I started yesterday configuring apache2 to use php-fpm, but I was just wondering if it could work for us, at least in dev, this frankenphp, just can't find how to install php-exts in the docs