Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,699 changes: 851 additions & 848 deletions .github/workflows/product_builder.yaml

Large diffs are not rendered by default.

25 changes: 0 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
SHELL = /bin/sh
GO_PACKAGE = github.com/dyrector-io/dyrectorio/protobuf/go

# Shortcut to start stack, fully containerized, stable build
.PHONY: up
up:
cd golang && \
make up

.PHONY: down
down:
cd golang && \
make down

# Shortcut to start stack with local development config
.PHONY: upd
upd:
cd golang && \
make upd

.PHONY: downd
downd:
cd golang && \
make downd

.PHONY: dwd
dwd: downd

# Shortcut for CLI
.PHONY: cli
cli:
Expand Down
79 changes: 79 additions & 0 deletions distribution/compose/docker-compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This is meant to be used for local development
services:
traefik:
container_name: traefik
image: docker.io/library/traefik:2.11
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --providers.file.directory=/etc/traefik/dynamic
ports:
- "${EXTERNAL_PORT:-80}:80"
volumes:
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock:ro
- ${PWD}/distribution/compose/traefik/dynamic:/etc/traefik/dynamic:ro
restart: unless-stopped
labels:
- org.dyrectorio.service-category=_internal
database:
container_name: database
image: ghcr.io/dyrector-io/dyrectorio/multi-database:1.0.4
environment:
- POSTGRES_PASSWORD=${ROOT_POSTGRES_PASSWORD}
- CRUX_POSTGRES_PASSWORD=${CRUX_POSTGRES_PASSWORD}
- KRATOS_POSTGRES_PASSWORD=${KRATOS_POSTGRES_PASSWORD}
restart: unless-stopped
volumes: ['database:/var/lib/postgresql/data']
ports:
- 127.0.0.1:5432:5432
healthcheck:
# testing the healtheck with a specific database and users
test: [CMD-SHELL, pg_isready -d crux -U crux_user]
interval: 5s
timeout: 5s
retries: 5
labels:
- org.dyrectorio.service-category=_internal
kratos:
container_name: kratos
image: ghcr.io/dyrector-io/dyrectorio/web/kratos:${DYO_VERSION:-latest}
environment:
- SQA_OPT_OUT=true
- DSN=postgres://kratos_user:${KRATOS_POSTGRES_PASSWORD}@database:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4&connect_timeout=5
- KRATOS_URL=${EXTERNAL_PROTO}://${DOMAIN}:${EXTERNAL_PORT}/kratos
- KRATOS_ADMIN_URL=http://kratos:4434
- AUTH_URL=${EXTERNAL_PROTO}://${DOMAIN}:${EXTERNAL_PORT}/auth
- CRUX_UI_URL=${EXTERNAL_PROTO}://${DOMAIN}:${EXTERNAL_PORT}
- LOG_LEVEL=info
- LOG_LEAK_SENSITIVE_VALUES=false
- SECRETS_COOKIE=${KRATOS_SECRET}
- COURIER_SMTP_CONNECTION_URI=${SMTP_URI}
- FROM_EMAIL=${FROM_EMAIL}
- FROM_NAME=${FROM_NAME}
ports:
- 4433:4433
- 4434:4434
depends_on:
database:
condition: service_healthy
kratos-migrate:
condition: service_completed_successfully
restart: unless-stopped
labels:
- org.dyrectorio.service-category=_internal
kratos-migrate:
container_name: kratos-migrate
image: ghcr.io/dyrector-io/dyrectorio/web/kratos:${DYO_VERSION:-latest}
command: -c /etc/config/kratos/kratos.yaml migrate sql -e --yes
environment:
- SQA_OPT_OUT=true
- DSN=postgres://kratos_user:${KRATOS_POSTGRES_PASSWORD}@database:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4
depends_on:
database:
condition: service_healthy
restart: 'no'
labels:
- org.dyrectorio.service-category=_internal
volumes:
database:
31 changes: 31 additions & 0 deletions distribution/compose/docker-compose.e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is meant to be used for running the e2e tests during ci
services:
traefik:
networks:
- dyo
database:
networks:
- dyo
mailslurper:
networks:
- dyo
kratos:
networks:
- dyo
kratos-migrate:
networks:
- dyo
crux:
networks:
- dyo
crux-migrate:
networks:
- dyo
crux-ui:
networks:
- dyo

networks:
dyo:
name: ${GITHUB_NETWORK}
external: true
29 changes: 29 additions & 0 deletions distribution/compose/traefik/dynamic/dynamic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
http:
routers:
kratos:
rule: Host(`localhost`) && PathPrefix(`/kratos`))
entrypoints: web
service: "kratos"
crux-http:
rule: "Host(`localhost`) && PathPrefix(`/api`) && !PathPrefix(`/api/auth`) && !PathPrefix(`/api/status`)"
entryPoints: ["web"]
service: "crux-api"
priority: 20
crux-ui:
rule: "Host(`localhost`)"
entryPoints: ["web"]
service: "crux-ui"
priority: 10
services:
crux-api:
loadBalancer:
servers:
- url: "http://172.17.0.1:1848"
crux-ui:
loadBalancer:
servers:
- url: "http://172.17.0.1:3000"
kratos:
loadBalancer:
servers:
- url: "http://172.17.0.1:4433"
2 changes: 1 addition & 1 deletion distribution/images/playwright/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:noble

RUN apt-get update && apt-get install -y docker-compose nodejs npm jq curl zstd libasound2t64
RUN apt-get update && apt-get install -y docker-compose-v2 nodejs npm jq curl zstd libasound2t64

RUN mkdir playwright

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ services:
- org.dyrectorio.service-category=_internal
volumes:
database:
name: dyodb
25 changes: 0 additions & 25 deletions golang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,6 @@ endif

GOPARAMS:= CGO_ENABLED=0 $(GRPC_DEBUG_FLAGS)

# cli start fully containerized stack, stable branch
.PHONY: up
up:
cd cmd/dyo && \
go run . up

# cli stop
.PHONY: down
down:
cd cmd/dyo && \
go run . down

# target `upd` is for development purposes it defaults to the latest images
# and expects crux and crux-ui to run locally
# for host name overrides you can define: --host localhost,yourdomain.com
.PHONY: upd
upd:
cd cmd/dyo && \
go run . --disable-crux --disable-crux-ui --image-tag latest --prefix dyo-latest --host localhost up

.PHONY: downd
downd:
cd cmd/dyo && \
go run . --prefix dyo-latest down

.PHONY: go-crane
go-crane:
air --build.cmd "" --build.bin "cd cmd/crane && ${GRPC_DEBUG_FLAGS} go run ."
Expand Down
Loading