Sign inSign up

slllaps/ocs-inventory

By slllaps

•Updated almost 9 years ago

OCS Inventory NG in containerized environment

Image
0

10K+

slllaps/ocs-inventory repository overview

⁠Requirements

Instructions on how to create the environment.

⁠Create Docker compose file

First create a folder called ocs-inventory, then create a file called docker-compose.yml with the following content:

NOTE: Do not forget to change the values of the properties with "<PUT ...>"

version: '2'

services:
    db-ocs:
      image: mysql:5.7
      volumes:
        - db-data:/var/lib/mysql
      environment:
        MYSQL_ROOT_PASSWORD: mysqlocs
        MYSQL_USER: ocsinventory
        MYSQL_PASSWORD: <PUT A PASSWORD>
        MYSQL_DATABASE: ocsweb
      ports:
        - "3306:3306"

    web-ocs:
      image: slllaps/ocs-inventory:2.3
      volumes:
        - web-data:/usr/share/ocsinventory-reports/ocsreports
      environment:
        ENV_OCS_DB_HOST: db-ocs
        ENV_OCS_DB_PORT: 3306
        ENV_OCS_DB_NAME: ocsweb
        ENV_OCS_DB_LOCAL: ocsweb
        ENV_OCS_DB_USER: ocsinventory
        ENV_OCS_DB_PWD: <PUT THE SAME PASSWORD YOUR CREATED ABOVE>
      links:
        - db-ocs:db
      ports:
        - "80:80"
      depends_on:
        - "db-ocs"
volumes:
    db-data:
    web-data:
⁠Run

From the created folder, run:

docker-compose up -d
⁠To access

http://localhost/ocsreports⁠

NOTA: In this case localhost is the machine with Docker running

Tag summary

Content type

Image

Digest

Size

160.9 MB

Last updated

almost 9 years ago

docker pull slllaps/ocs-inventory:2.3.1