cachethq / Docker

A Dockerized version of Cachet.
https://cachethq.io
BSD 3-Clause "New" or "Revised" License
411 stars 285 forks source link

Docker-compose tutorial updates? #417

Open esseti opened 2 years ago

esseti commented 2 years ago

I'm trying to test out Cachet with docker-compose following this link: https://docs.cachethq.io/docs/get-started-with-docker

so far:

anyone that has an update guide for deploying cachet? is the project mantained?

esseti commented 2 years ago

Problem:

esseti commented 2 years ago

I was able to make it start and work. docker-compose for postgres + cachet OS bgubx and certbot for serving and https

docker-compose.yml

(fix missing data or remove stuff)

version: "3"

services:
  postgres:
    image: postgres:12-alpine
    volumes:
      - dbdata:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
    restart: always
  cachet:
    image: cachethq/docker:latest
    ports:
      - 8000:8000
    links:
      - postgres:postgres
    environment:
      - DB_DRIVER=pgsql
      - DB_HOST=postgres
      - DB_PORT=5432
      - DB_DATABASE=postgres
      - DB_USERNAME=postgres
      - DB_PASSWORD=postgres
      - DB_PREFIX=chq_
      - APP_LOG=errorlog
      - APP_ENV=${APP_ENV:-production}
      - APP_DEBUG=false
      - DEBUG=false
      - APP_KEY=<YOURKEY>
      # this is the domain
      - MAIL_USERNAME=<DOMAIN IN MAILGUN>
      - MAIL_DRIVER=mailgun
      - MAIL_HOST=smtp.mailgun.org
      - MAIL_PORT=587
      # this is the api Key
      - MAIL_PASSWORD=<APIKEY>
      - MAIL_ADDRESS=<EMAIL ADDRESS>
      - MAIL_ENCRYPTION=tls

    depends_on:
      - postgres
    restart: on-failure

# persistent storage
volumes:
  dbdata:

with this you have the system exposed to localhost:8000

cachet.conf (put in /sites-enabled)

server {
  listen 80;
  # the servername
  server_name <YOUR DOMAIN>;
  location / {
    proxy_pass http://localhost:8000/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }
}

with this you have it exposed to :80

for SSL use certbot (https://certbot.eff.org/ -> select nginx and your operating system for instruction)