Skip to content

One container instead of two #147

@morthim

Description

@morthim

Hello!

Since this is a PHP project, why not use FrankenPHP ?
It's a PHP app server that use Caddy as a web server.

I tried to deploy Perlite with FrankenPHP and it works.

The compose.yml I used after I cloned the project in a new folder:

services:
  php:
    container_name: perlite
    image: dunglas/frankenphp
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    restart: unless-stopped
    environment:
      - NOTES_PATH=Demo
      - HIDE_FOLDERS=docs,private,trash
      - LINE_BREAKS=true
      - ABSOLUTE_PATHS=false
      - ALLOWED_FILE_LINK_TYPES=pdf,mp4
      - DISABLE_POP_HOVER=false
      - SHOW_TOC=true
      - SHOW_LOCAL_GRAPH=true
      - HOME_FILE=README
      - FONT_SIZE=15
      - HTML_SAFE_MODE=true
      - TEMP_PATH=/tmp
      - SITE_TITLE=Demo
      - SITE_TYPE=article
      - SITE_URL=
      - SITE_IMAGE=
      - SITE_DESC=
      - SITE_NAME=Perlite
      - SITE_TWITTER=https://x.com/
      - SITE_LOGO=perlite.svg
      - SITE_HOMEPAGE=https://perlite.secure77.de/
      - SITE_GITHUB=https://github.com/

      # FrankenPHP
      # Uncomment SERVER_NAME to access via http://HOST_IP instead of https://localhost 
      # (https://frankenphp.dev/docs/#docker and https://caddyserver.com/docs/caddyfile/concepts#addresses)
      #- SERVER_NAME=http://
    volumes:
      - ./perlite:/app/public:ro

The ./perlite matches this folder

This could resolve the issue of deploying one Docker image instead of two.
What do you think about this solution ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions