Skip to content

Docker

For now the easiest way to use Open Case is with Docker. We publish Docker images of Open Case on GitLab, of which the latest tag is also deployed to the online demo.

Please have a look at the configuration for all required and possible options.

Docker Compose

You can use the following docker-compose.yml and .env to start up Open Case:

yaml
# docker-compose.yml
services:
    app:
        image: open-case:latest
        ports:
            - '${APP_HOST:-127.0.0.1}:${APP_PORT:-80}:80'
        depends_on:
            db:
                condition: service_healthy
        volumes:
            - ./data:/var/www/html/storage/app
        env_file:
            - .env
    db:
        image: 'mysql/mysql-server:8.0'
        ports:
            - '${FORWARD_DB_PORT:-3306}:3306'
        volumes:
            - ./db:/var/lib/mysql
        environment:
            MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
            MYSQL_DATABASE: '${DB_DATABASE}'
            MYSQL_USER: '${DB_USERNAME}'
            MYSQL_PASSWORD: '${DB_PASSWORD}'
        healthcheck:
            test: ["CMD", "mysqladmin", "ping", "-u${DB_USERNAME}", "-p${DB_PASSWORD}"]
            retries: 5
            timeout: 3s
conf
# .env
APP_NAME=Laravel
APP_ENV=production
APP_KEY=base64:p1eIxksKRUQbEwHh9PJ1+0jJ4n0TlSyBLYPUZ98lY2E=
APP_DEBUG=false
APP_URL=http://localhost:8000
APP_PORT=8000
APP_HOST=127.0.0.1

WWWGROUP=1000
WWWUSER=1000

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=opencase
DB_USERNAME=sail
DB_PASSWORD=password
DB_RESET_TO_SQL_DUMP_FILE=testing.open-case.org.sql

FORWARD_DB_PORT=3307

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

To create an admin user you can run:

bash
docker compose exec -it app php artisan db:seed --class=UserSeeder