Code Monkey home page Code Monkey logo

dockerify-osticket's Introduction

osTicket for Docker!

This repository contains various automation scripts for managing osTicket in a Docker container.

Git Submodules

The project uses Git Submodules to pull the latest version of osTicket. Alternatively, one may pin the submodule to a specific tag/release/commit.

# Clone this repository while recursing on the submodules.
git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/BastiDood/dockerify-osTicket.git

# Get all the tags from the remote for each submodule.
# In our case, osTicket is the only submodule.
git submodule foreach 'git fetch --tags'

Environment Variables

See the different ways to inject environment variables into the Docker build. Note that the docker-compose.yml file has been configured to accept a mysql.env file in the repository root.

Name Description Required Default
MYSQL_ROOT_PASSWORD Default password of the root user in the MySQL database. โœ”
MYSQL_DATABASE Default name for the newly created database for osTicket. โŒ osticket
MYSQL_USER Default username for the non-root MySQL user. โŒ user
MYSQL_PASSWORD Default password for the non-root MySQL user. โœ”

Note that the Docker container for MySQL supports more environment variables. Moreover, the MySQL database itself honors additional environment variables.

Docker Compose

# Start the PHP and MySQL containers in the background.
docker compose up -d

# Run the setup command into `/var/www/html`.
docker compose exec --workdir /web/osTicket web ./manage.php deploy -g --setup /var/www/html/

# Rename `ost-sampleconfig.php` => `ost-config.php`.
docker compose exec web cp -vn /var/www/html/include/ost-sampleconfig.php /var/www/html/include/ost-config.php

# If this is the first setup, make sure to make the configuration file
# writable by the setup wizard at http://localhost/setup/install.php.
docker compose exec web chmod 0666 /var/www/html/include/ost-config.php

# Complete the setup wizard at http://localhost/setup/install.php...

# After finishing the setup wizard at http://localhost/setup/install.php,
# set the `ost-config.php` back to read-only for extra security.
docker compose exec web chmod 0644 /var/www/html/include/ost-config.php

# Also, don't forget to remove the setup folder when we're done!
docker compose exec web rm -rf /var/www/html/setup

# Tear down the web and database containers.
docker compose down

dockerify-osticket's People

Contributors

bastidood avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.