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. Start the containers.
  2. Create .env file in the directory where the docker-compose.yaml is located.
  3. Copy the content of the example env file into the .env file.
  4. Change the APP_URL.
  5. Use a strong password for the DB_PASSWORD setting.
  6. Run the database migrations.
docker exec -it servas php artisan migrate
  1. Generate the application key.
docker exec -it servas php artisan key:generate

 

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: