Skip to main content

Servas

Docker

Servas is available as an official Docker image.
Docker is also the preferred way to use Servas.
Docker Compose file

Initial steps:

  1. Create .env file in the directory where the docker-compose.yaml is located.
  2. Copy the content of the example env file into the .env file.
  3. Change the APP_URL.
  4. Use a strong password for the DB_PASSWORD setting.
  5. Start the containers with docker-compose up -d.
  6. Generate the application key:
docker exec -it servas php artisan key:generate --force
  1. Restart the containers with docker-compose restart.
  2. Open your browser and create a user account at https://your-servas-instance/register.

APP_NAME=Servas
APP_ENV=production
APP_KEY=base64:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
APP_DEBUG=false
APP_URL=http://192.168.0.16:1245

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=servas_db
DB_USERNAME=servas
DB_PASSWORD=xxxxxx
version: "3"

services:
  db:
    image: mariadb:10.7.3
    restart: unless-stopped
    command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
    environment:
      - MARIADB_ROOT_PASSWORD=xxxxxxx
      - MARIADB_USER=servas
      - MARIADB_PASSWORD=xxxxxx
      - MARIADB_DATABASE=servas_db
    volumes:
      - /srv/path/Files/Servas/db:/var/lib/mysql

  servas:
    image: beromir/servas
    container_name: servas
    restart: unless-stopped
    depends_on:
      - db
    ports:
      - "1245:80"
    volumes:
      - /path/servas/.env:/var/www/html/.env

volumes:
  servas-db-data: