diff --git a/Makefile b/Makefile index 664699c1..8c793b17 100644 --- a/Makefile +++ b/Makefile @@ -26,10 +26,14 @@ down: clean: down docker rmi sapphire --force -up: clean build +update: + docker stack deploy -c docker-compose.yaml sapphire + +sleep: ifeq ($(OSFLAG),WIN) timeout /t 15 else sleep 15 endif - docker stack deploy -c docker-compose.yaml sapphire + +up: clean build sleep update diff --git a/README.md b/README.md index c3b75eb2..451c5904 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,14 @@ GRANT ALL PRIVILEGES ON DATABASE service_name TO service_name; ALTER DATABASE service_name OWNER TO service_name; ``` +Create database for glitchtip +```shell +CREATE ROLE glitchtip WITH LOGIN ENCRYPTED PASSWORD 'P@ssw0rd'; +CREATE DATABASE glitchtip; +GRANT ALL PRIVILEGES ON DATABASE glitchtip TO glitchtip; +ALTER DATABASE glitchtip OWNER TO glitchtip; +``` + For autotests you should install all autotests fixtures from every service: Users, Projects, Notifications, Messenger ```shell diff --git a/docker-compose.yaml b/docker-compose.yaml index fc1aa2f6..3c1820ac 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -23,6 +23,26 @@ services: deploy: replicas: 1 + glitchtip: + image: glitchtip/glitchtip + environment: + SECRET_KEY: secret_key + DATABASE_URL: ${GLITCHTIP_DB_DSN:-postgres://glitchtip:P@ssw0rd@database:5432/glitchtip} + GLITCHTIP_DOMAIN: ${GLITCHTIP_ROOT_URL:-http://localhost:3000/glitchtip} + GLITCHTIP_URL: ${GLITCHTIP_ROOT_URL:-http://localhost:3000/glitchtip} + PORT: 8000 + deploy: + labels: + - "traefik.enable=true" + # - "traefik.http.middlewares.glitchtip-stripprefix.stripprefix.prefixes=${GLITCHTIP_ROOT_PATH:-/glitchtip}" + - "traefik.http.routers.glitchtip.rule=PathPrefix(`${GLITCHTIP_ROOT_PATH:-/glitchtip}`)" + # - "traefik.http.routers.glitchtip.middlewares=glitchtip-stripprefix" + - "traefik.http.routers.glitchtip.entrypoints=web" + - "traefik.http.routers.glitchtip-static.rule=PathPrefix(`/static`)" + - "traefik.http.routers.glitchtip-static.entrypoints=web" + - "traefik.http.services.glitchtip.loadbalancer.server.port=8000" + replicas: 1 + zookeeper: image: confluentinc/cp-zookeeper:7.5.0 user: 0:0