#229·majestic

[Feature request] docker image

Author: LoganTannCreated Mar 6, 2024Updated Apr 2, 2024

Is this a bug report or a feature request?

This is a feature request

Version Info

  • Version of Majestic: 1.8.1
  • Version of Jest: 29.6.3
  • Version of Node: 18
  • Operating System: Windows 1°

Feature

It would be very cool to create a docker image to quickly start the app in a test container.

Example :

yaml
version: '3.8'

services:
   test-gui:
        image: majestic:1.8-alpine
        environment:
            # Usage : define arguments via environment variables
            - MAJESTIC_DEBUG=true
            - MAJESTIC_CONFIG=...
            # Pros : ability to pass env variables to jest
            - TEST_DATABASE_URL=postgres://test_user:test_password@test_db:5432/test_db
        depends_on:
            # Pros : ability to depend on other services (such as a DB)
            - test_db
        volumes:
            # Usage : Define a volume to specify the path of the project to test, eg.
            - .:/usr/src/app
            # Pros : Ability to persist jest cache in a volume
            - jestCache:/cache/jest
        ports:
            - '4000:4000'

volumes:
    jestCache:
        driver: local