Installation
Docker-Compose
Glitchtip has docker images already prepared so we only have to make a few small configurations.
The first thing we are going to do is to create a .env
file with the database configuration data.
.env
POSTGRES_DB=glitchtip
POSTGRES_USER=glitchtipOSDO
POSTGRES_PASS=glitchtipPASS
We create the network to connect the defectdojo to the traefik
docker networks create glitchtip
We create the SECRET_KEY
that the application needs to work and we substitute them in the environment variables of the docker-compose.yml
openssl rand -hex 32
We have to change the GLITCHTIP_DOMAIN
variable of example.com
in the traefik label of the Host and the GLITCHTIP_DOMAIN
variable of example.com
for the domain we want.
warning
docker-compose.yml
version: "3.8"
x-environment:
&default-environment
DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
SECRET_KEY: CREATE_NET_SECRET_KEY
PORT: 8000
EMAIL_URL: consolemail://
GLITCHTIP_DOMAIN: https://glitchtip.example.com # Change this to your domain
DEFAULT_FROM_EMAIL: info@example.com # Change this to your email
CELERY_WORKER_MAX_TASKS_PER_CHILD: "10000"
ENABLE_USER_REGISTRATION: "false"
x-depends_on:
&default-depends_on
- postgres
- redis
services:
postgres:
image: postgres:15
container_name: postgres-glitchtip
environment:
POSTGRES_HOST_AUTH_METHOD: "trust" # Consider removing this and setting a password
restart: unless-stopped
volumes:
- pg-data:/var/lib/postgresql/data
networks:
- glitchtip
redis:
image: redis
container_name: redis-glitchtip
restart: unless-stopped
networks:
- glitchtip
web:
image: glitchtip/glitchtip@sha256:4b67df9b1ee43f02ab7167caf84f9df24377e4de1cffc748c37932e757ca1049
container_name: web-glitchtip
depends_on: *default-depends_on
labels:
- "traefik.enable=true"
- "traefik.http.routers.glitchtip.rule=Host(`glitchtip.example.com`)"
- "traefik.http.routers.glitchtip.entrypoints=websecure"
- "traefik.http.routers.glitchtip.tls=true"
- "traefik.http.routers.glitchtip.tls.certresolver=le"
- "traefik.http.services.glitchtip-service.loadbalancer.server.port=8000"
environment: *default-environment
restart: unless-stopped
volumes:
- uploads:/code/uploads
networks:
- glitchtip
worker:
image: glitchtip/glitchtip@sha256:4b67df9b1ee43f02ab7167caf84f9df24377e4de1cffc748c37932e757ca1049
command: ./bin/run-celery-with-beat.sh
container_name: worker-glitchtip
depends_on: *default-depends_on
environment: *default-environment
restart: unless-stopped
volumes:
- uploads:/code/uploads
networks:
- glitchtip
migrate:
container_name: migrate-glitchtip
image: glitchtip/glitchtip@sha256:4b67df9b1ee43f02ab7167caf84f9df24377e4de1cffc748c37932e757ca1049
depends_on: *default-depends_on
command: "./manage.py migrate"
environment: *default-environment
networks:
- glitchtip
volumes:
pg-data:
uploads:
networks:
glitchtip:
external: true
tip
Before you start it, remember to add the network in traefik
We started up the containers.
docker-compose up -d