Skip to content

Commit

Permalink
read edgeproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienPensart committed Jan 11, 2024
1 parent ed135d6 commit af23667
Show file tree
Hide file tree
Showing 28 changed files with 1,496 additions and 1,574 deletions.
43 changes: 25 additions & 18 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
:80 {
log {
output stderr
}
file_server browse
root * hyperedge
:8081 {
log {
output stderr
}
file_server browse
root * edgeproxy/static

# handle /artists {
# method POST
# request_body {
# replace `{"query": "select artists {*}"}`
# }
# request_header Content-Type application/json
# rewrite * /db/edgedb/edgeql
# reverse_proxy http://localhost:10701
# }
handle /artists {
method POST
request_body {
replace `{"query": "select artists {*}"}`
}
request_header Content-Type application/json
# header_up Host {upstream_hostport}
rewrite * /db/edgedb/edgeql
reverse_proxy https://localhost:5656 {
header_up Host {upstream_hostport}
transport http {
tls
tls_insecure_skip_verify
}
}
}

handle /artists {
reverse_proxy http://localhost:8081
}
# handle /artists {
# reverse_proxy http://localhost:8081
# }
}
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ services:
ports:
- 5656:5656
environment:
EDGEDB_DOCKER_LOG_LEVEL: warning
EDGEDB_SERVER_ADMIN_UI: enabled
EDGEDB_SERVER_TLS_CERT_MODE: generate_self_signed
EDGEDB_SERVER_SECURITY: insecure_dev_mode
EDGEDB_SERVER_HTTP_ENDPOINT_SECURITY: optional
EDGEDB_SERVER_USER: musicbot
EDGEDB_SERVER_PASSWORD: musicbot
EDGEDB_DOCKER_LOG_LEVEL: warning
volumes:
- ./dbschema:/dbschema
- ./credentials:/root/.config/edgedb/credentials
Expand All @@ -24,11 +26,13 @@ services:
ports:
- 5657:5656
environment:
EDGEDB_DOCKER_LOG_LEVEL: info
EDGEDB_SERVER_SECURITY: insecure_dev_mode
EDGEDB_SERVER_TLS_CERT_MODE: generate_self_signed
EDGEDB_SERVER_ADMIN_UI: enabled
EDGEDB_SERVER_USER: testuser
EDGEDB_SERVER_PASSWORD: testpass
EDGEDB_SERVER_TLS_CERT_MODE: generate_self_signed
# EDGEDB_SERVER_HTTP_ENDPOINT_SECURITY: optional
volumes:
- ./dbschema:/dbschema

Expand Down
Loading

0 comments on commit af23667

Please sign in to comment.