22032025-1

This commit is contained in:
Zeev Diukman 2025-03-22 08:57:53 +00:00
parent 027b76eba4
commit 64744aa74c
2983 changed files with 2432 additions and 24 deletions

View file

@ -1,20 +1,20 @@
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"
tmp_dir = "./z/tmp"
[build]
args_bin = []
bin = "./_tmp/main"
cmd = "go build -o ./_tmp/main ./z"
bin = "./z/tmp/main"
cmd = "go build -o ./z/tmp/main ./z/."
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
exclude_dir = ["assets", "tmp", "vendor", "testdata","backups","database"]
exclude_file = []
exclude_regex = ["_test.go"]
exclude_unchanged = false
follow_symlink = false
full_bin = ""
include_dir = []
include_ext = ["go", "tpl", "tmpl", "html"]
include_ext = ["go", "tpl", "tmpl", "html","yaml","yml"]
include_file = []
kill_delay = "0s"
log = "build-errors.log"
@ -48,5 +48,5 @@ tmp_dir = "tmp"
proxy_port = 0
[screen]
clear_on_rebuild = true
clear_on_rebuild = false
keep_scroll = true

8
.env Normal file
View file

@ -0,0 +1,8 @@
CONFIG_PATH = ./z/config
CONFIG_NAME = config
DB_HOST=localhost
DB_PORT=5432
DB_USER=admin
DB_PASSWORD=admin
DB_NAME=zprox

BIN
_tmp/main

Binary file not shown.

126
backups/authcopy.bkup Normal file
View file

@ -0,0 +1,126 @@
routers:
keycloak:
priority: 1
entryPoint: https
service: keycloak
routes:
- Host(`auth.z.com`).PathPrefix(`/`)
tls:
certProvider: default
# stripPrefix: true
# openid:
# priority: 2
# entryPoint: http
# service: openid
# routes:
# - Host(`127.0.0.1`).PathPrefix(`/keycloak/openid`)
# tls:
# certProvider: default
# stripPrefix: true
# issuer:
# priority: 2
# entryPoint: https
# service: issuer
# routes:
# - Host(`auth.z.com`).PathPrefix(`/issuer`)
# tls:
# certProvider: default
# stripPrefix: true
# config:
# priority: 2
# entryPoint: http
# service: config
# routes:
# - Host(`127.0.0.1`).PathPrefix(`/keycloak/config`)
# tls:
# certProvider: default
# stripPrefix: true
# authorization:
# priority: 2
# entryPoint: https
# service: authorization
# routes:
# - Host(`auth.z.com`).PathPrefix(`/auth`)
# tls:
# certProvider: default
# stripPrefix: true
# token:
# priority: 2
# entryPoint: http
# service: token
# routes:
# - Host(`127.0.0.1`).PathPrefix(`/keycloak/token`)
# tls:
# certProvider: default
# stripPrefix: true
# introspection:
# priority: 2
# entryPoint: http
# service: introspection
# routes:
# - Host(`127.0.0.1`).PathPrefix(`/keycloak/introspect`)
# tls:
# certProvider: default
# stripPrefix: true
# userinfo:
# priority: 2
# entryPoint: http
# service: userinfo
# routes:
# - Host(`127.0.0.1`).PathPrefix(`/keycloak/userinfo`)
# tls:
# certProvider: default
# stripPrefix: true
# logout:
# priority: 2
# entryPoint: https
# service: logout
# routes:
# - Host(`auth.z.com`).PathPrefix(`/logout`)
# tls:
# certProvider: default
# stripPrefix: true
# certs:
# priority: 2
# entryPoint: http
# service: certs
# routes:
# - Host(`127.0.0.1`).PathPrefix(`/keycloak/certs`)
# tls:
# certProvider: default
# stripPrefix: true
services:
keycloak: http://127.0.0.1:8080
auth:
keycloak:
sessionSecret: keycloak
paths:
prefix: /auth
login: /login
logout: /logout
callback: /callback
postlogout: /post-logout
openId:
realm: dev
client_id: dev_client
client_secret: dWhSJgARBAuBAXN7sUTpqpIq2sKQdugs
redirect_uri: https://app.z.com/auth/callback
post_logout_redirect_uri: https://app.z.com/auth/post-logout
issuer: https://auth.z.com/realms/dev/
authURL: https://auth.z.com/realms/dev/protocol/openid-connect/auth
logoutUrl: https://auth.z.com/realms/dev/protocol/openid-connect/logout
config: https://auth.z.com/realms/dev/.well-known/openid-configuration
tokenURL: http://127.0.0.1:8080/realms/dev/protocol/openid-connect/token
userURL: http://127.0.0.1:8080/realms/dev/protocol/openid-connect/userinfo
jwksURI: http://127.0.0.1:8080/realms/dev/protocol/openid-connect/certs

48
backups/configcopy.bkup Normal file
View file

@ -0,0 +1,48 @@
routers:
app:
entryPoint: https
service: app
routes:
- Host(`app.z.com`)
tls:
certProvider: default
auth:
enabled: true
provider: keycloak
# app-user:
# # priority: 1000
# entryPoint: https
# service: app
# routes:
# - Host(`app.z.com`).Path(`/test1`)
# # stripPrefix: true
# tls:
# certProvider: default
# auth:
# # jwt:
# # allow:
# # email:
# # - zeevdukeman@gmail.com
# enabled: true
# provider: keycloak
services:
app: http://127.0.0.1:3001
entrypoints:
https:
address: :443
tls:
enabled: true
http:
address: :80
tls:
certProviders:
default:
key: z/assets/certs/z.com.key.pem
cert: z/assets/certs/z.com.cert.pem

1
backups/z_bkup_1 Submodule

@ -0,0 +1 @@
Subproject commit 2c7fbd66172399f01cd7351a4980780fdc64678d

View file

@ -0,0 +1,23 @@
services:
databse:
image: postgres:latest
restart: always
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
POSTGRES_DB: zprox
ports:
- "5432:5432" #maps host's port 5432 to the container's port 5432.
volumes:
- ./postgres_data:/var/lib/postgresql/data/
networks:
database:
ipv4_address: 10.100.0.1
networks:
database:
driver: bridge
ipam:
config:
- subnet: 10.100.0.0/24
gateway: 10.100.0.254

View file

@ -0,0 +1 @@
17

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

View file

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

View file

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more