Skip to content

Commit 201587a

Browse files
committed
reconfigure-local-caddy
1 parent c9ce797 commit 201587a

File tree

9 files changed

+19
-133
lines changed

9 files changed

+19
-133
lines changed

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ COPY ./bin ./bin/
7777

7878
RUN chown -R deepchecks.deepchecks /code
7979

80-
COPY ./deploy/local_certs/CA/rootCA.pem /usr/local/share/ca-certificates/deepchecksRootCA.crt
81-
RUN update-ca-certificates
82-
8380
USER deepchecks
8481

8582
# Expose container port and run entry point script

deploy-oss.sh

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -117,49 +117,6 @@ then
117117
export TLS_BLOCK="acme_ca https://acme-staging-v02.api.letsencrypt.org/directory"
118118
fi
119119

120-
# rewrite caddyfile
121-
rm -f Caddyfile
122-
if [[ $ENABLE_HTTP == 'true' ]]; then
123-
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
124-
envsubst > Caddyfile <<EOF
125-
{
126-
auto_https disable_redirects
127-
}
128-
$DOMAIN:8443 {
129-
tls /certs/localhost.crt /certs/localhost.key
130-
131-
reverse_proxy http://casdoor:4545 {
132-
header_up Host {upstream_hostport}
133-
header_up X-Real-IP {remote_host}
134-
}
135-
}
136-
$DOMAIN, :443 {
137-
tls /certs/localhost.crt /certs/localhost.key
138-
139-
reverse_proxy http://app:8000
140-
}
141-
$DOMAIN:80 {
142-
reverse_proxy http://app:8000
143-
}
144-
EOF
145-
else
146-
envsubst > Caddyfile <<EOF
147-
{
148-
$TLS_BLOCK
149-
}
150-
$DOMAIN:8443 {
151-
reverse_proxy http://casdoor:4545 {
152-
header_up Host {upstream_hostport}
153-
header_up X-Real-IP {remote_host}
154-
}
155-
}
156-
$DOMAIN, :80, :443 {
157-
reverse_proxy http://app:8000
158-
}
159-
EOF
160-
161-
fi;
162-
163120
# Write .env file
164121
envsubst > .env <<EOF
165122
DEEPCHECKS_SECRET=$DEEPCHECKS_SECRET

deploy/caddyfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
auto_https disable_redirects
3+
}
4+
5+
{$DOMAIN:localhost}:8443 {
6+
reverse_proxy http://casdoor:4545 {
7+
header_up Host {upstream_hostport}
8+
header_up X-Real-IP {remote_host}
9+
}
10+
}
11+
12+
{$DOMAIN:localhost}, :443 {
13+
reverse_proxy http://app:8000
14+
}
15+
16+
{$DOMAIN:localhost}:80 {
17+
reverse_proxy http://app:8000
18+
}

deploy/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ services:
166166
- '443:443'
167167
- '8443:8443'
168168
volumes:
169-
- ./Caddyfile:/etc/caddy/Caddyfile
170-
- ./monitoring/deploy/local_certs/certs:/certs
169+
- ./monitoring/deploy/.caddyfile:/etc/caddy/Caddyfile
171170
depends_on:
172171
- app
173172
networks:

deploy/local_certs/CA/rootCA.pem

Lines changed: 0 additions & 16 deletions
This file was deleted.

deploy/local_certs/certs/localhost.crt

Lines changed: 0 additions & 18 deletions
This file was deleted.

deploy/local_certs/certs/localhost.key

Lines changed: 0 additions & 27 deletions
This file was deleted.

deploy/local_certs/localhost.csr

Lines changed: 0 additions & 15 deletions
This file was deleted.

deploy/local_certs/localhost.ext

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)