Public Repository

Last pushed: 3 months ago
Short Description
Short description is empty for this repo.
Full Description

Docker container for CachetHQ/Cachet

Docker Hub Builds

Builds are done by Codeship

tag Status Docker Hub
latest alinuxninja/cachet:latest

By default, docker-compose.yml uses Docker Hub for the image and does not do building, though it can be set to build from the included Dockerfile if needed.

Configuration

In this container, we will use environment variables to configure Cachet instead of the .env file. As a result, we can persist changes accross various installations without having to mount anything.

Starting the container

docker-compose up -d

Generating an App Key

docker exec -i -t cachet_php_1 php artisan key:generate

A key will be generated and added to /srv/Cachet/.env. To keep the key persistent (which we will need in future installs), we will save this as an environment variable.

To retrieve the key, we run the following.

docker exec -i -t cachet_php_1 cat .env | grep APP_KEY

Copy the output and add it to the "environments" section of the php container in docker-compose.yml.

For example, after adding the key, the section would look like the code block below.

    environment:
      - APP_KEY="base64:Xlwt9gnVWtwRR/xSMuGIZ71xV3jerFt3I8+BJ6HcxvQ="
      - DB_DRIVER=mysql
      - DB_HOST=mysql

Setting up Database

Change configuration in docker-compose.yml to update passwords for MySQL. Note that both passwords in the php service and mysql service service have to be changed.

Run the following to migrate the database.

docker exec -i -t cachet_php_1 php php artisan app:install

Updating

Run the following after pulling a new version of the container.

docker exec -i -t cachet_php_1 php artisan down
docker exec -i -t cachet_php_1 php artisan app:update
docker exec -i -t cachet_php_1 php artisan up
Docker Pull Command
Owner
alinuxninja

Comments (0)