Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides overall tips for using of the OMS system, with the aim of reducing frustration and increasing productivity!

General

Docker

Info
title'bash ./oms.sh' and 'docker-compose'

Currently `bash ./oms.sh` pretty much equals `docker-compose` (oms.sh is a helper script that loads several docker-compose.yml files and combines them using the '-f' option, when running it you can see the full command)


Useful commands:

  • `docker-compose `bash ./oms.sh up -d`
    • Start the system in detached mode - no endless log in the terminal.
  • `docker-compose `bash ./oms.sh down -v`
    • (Gracefully) stop the system, `-v` specifies that the volumes (data) of the containers should be removed as well
  • `docker ps -a`
    • Show (`-a` for all) running containers
  • `docker-compose `bash ./oms.sh logsĀ [container-name]`
    • Show the logs of a specific container, leave empty for all logs
  • `docker-compose `bash ./oms.sh run [container-name] bash`
    • 'Enter' the container using bash.

...

Info
titledocker vs docker-compose

`docker` works system wide, `docker-compose` works from a folder with a `docker-compose.yml` file (for oms-docker this is `oms-docker/docker`)

Helper scripts

oms-

...

docker/

...

A bash script that has the goal of providing quick and easy ways to build, tag and push containers (a single container, just the stable ones or all of them!)

Additionally it has a reset command to reset all the docker containers on your system (note that this also removes docker containers unrelated to OMS):

Code Block
languagebash
titleReset the docker containers, useful for a clean install!
bash oms_setup.sh --reset

oms-docker/deploy.sh

This script is designed to aid deployment on a public (production) server, having the ability to quickly install the newest version while retaining environment variables. Simply move the file one level above the oms-docker installation and call it using `bash deploy.sh`


OMS-Core

Log in onto the core container (from `../oms-docker/docker`):

`docker-compose run omscore bash`

Useful commands inside the container:

  • `php artisan help`
  • `php artisan migrate:refresh --seed`
    • Re-migrates the database (rebuilds) and automatically seeds it afterwards. Useful to reset all the data.
  • `php artisan config:cache`
    • Updates the cache that is stored for the config, required after every modification of a file inside the config folder (and the .env file)
  • `composer dump-autoload`
    • Clears the autoload caching of composer, useful if you are having problems with PHP finding classes.
  • `composer update`
    • Updates the composer dependencies, useful if there is a dependency problem.

Then a final trick, after updating services for laravel (adding them to `config/app.php`) it is sometimes required to delete the services.php file inside the `storage/bootstrap` directory.