Skip to content

Latest commit

 

History

History
97 lines (66 loc) · 2.47 KB

server.md

File metadata and controls

97 lines (66 loc) · 2.47 KB

Server Setup

There are different ways to get Meh up and running. You can use Docker, Docker Compose, or set it up manually on your server.

Using Docker

Meh is available as a Docker image for easy deployment. It's based on the official PHP image and includes everything you need to run Meh.

Images are available on the GitHub Container Registry (GHCR) and Docker Hub.

To start the container use:

docker run --name meh -p 8080:80 -v meh-data:/app/data splitbrain/meh:latest

To run the command line tool use:

docker exec meh /app/meh

Use the command line tool to initialize the database and configure your installation. Configuration can also be done via environment variables.

Using Docker Compose

Docker Compose makes it easy to define and manage your Meh deployment configuration. Here's a minimal example:

services:
  meh:
    image: splitbrain/meh:latest
    ports:
      - "8080:80"
    volumes:
      - ./data:/app/data
    restart: unless-stopped

Start the container with:

docker-compose up -d

To run the command line tool use:

docker-compose exec meh /app/meh

Use the command line tool to initialize the database and configure your installation. Configuration can also be done via environment variables.

Manual Setup

Of course, you can run the whole thing the classical way.

Requirements

  • PHP 8.1 or higher
  • SQLite extension for PHP
  • Composer (for installation)
  • Node.js and npm (for building the frontend)
  • Web server (Apache, Nginx, etc.)

Installation Steps

  1. Clone the repository:

    git clone https://github.com/splitbrain/meh.git
    cd meh
  2. Install backend dependencies:

    cd backend
    composer install --no-dev
    cd ..
  3. Build the frontend:

    cd frontend
    npm install
    npm run build
    cd ..
  4. Point your web server to the public directory

Use the command line tool to initialize the database and configure your installation. Configuration can also be done via environment variables.

URL Rewriting

Meh requires URL rewriting to work correctly. There's a .htaccess file included that handles this for Apache. For other web servers, you need to configure URL rewriting manually.