Skip to content

Commit dbb1f4f

Browse files
authored
Merge pull request #43 from manulera/configure-https-proxy
PROXY and HTTPS settings via env vars added
2 parents 7612f8b + ee90b1d commit dbb1f4f

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ You can use the backend library to script and automate cloning design. Have a lo
4343
You can use the image [manulera/opencloning](https://hub.docker.com/r/manulera/opencloning), and use `docker-compose.yaml` as a starting point. The important information to know is that:
4444

4545
* The image exposes port 8000.
46-
* You can allow requests to the API from origins other than the frontend via CORS using ENV variables, see the [backend configuration](https://github.com/manulera/OpenCloning_backend#connecting-to-the-frontend). See the comments in the `docker-compose.yaml` file.
46+
* You can configure several things via ENV variables, see the comments in the `docker-compose.yaml` file:
47+
* Proxy for external requests
48+
* Usage of HTTPS
49+
* Root path at which the app is served
50+
* Allowed origins for CORS
4751
* This container serves both the frontend and the backend, but you can run them as separate containers (will need CORS configuration).
4852

4953
```bash

docker-compose.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: "3"
33
services:
44
opencloning:
55
build: .
6-
image: manulera/opencloning:local
6+
image: manulera/opencloning:prod
77
ports:
88
- "8000:8000"
99

@@ -12,26 +12,26 @@ services:
1212
# If you want to allow other origins via CORS (comma separated)
1313
# IMPORTANT: Do not add a trailing slash to the URLs:
1414
# > Do not use http://localhost:3000/, but http://localhost:3000
15-
# - ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001
15+
# - ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001
1616
#
1717
# If you want to use a subpath of the domain, set ROOT_PATH,
1818
# this is the equivalent of --root-path in uvicorn, so the routes
1919
# without this prefix will also work (e.g. / will be the same as /opencloning/).
2020
# IMPORTANT: Do not add trailing slash, and don't use quotes.
21-
# - ROOT_PATH=/opencloning
21+
# - ROOT_PATH=/opencloning
2222
#
2323
# Set this if you are not using "/" as rooth path. Note the trailing slash.
24-
# - BACKEND_URL=/opencloning/
24+
# - BACKEND_URL=/opencloning/
2525
# Set this if you want to use plannotate
2626
- PLANNOTATE_URL=http://plannotate:8000
2727
# Set this if you want to use a proxy for the external requests made by the backend
2828
# (example is using mitmproxy locally on port 8080)
29-
- PROXY_URL=http://host.docker.internal:8080
29+
# - PROXY_URL=http://host.docker.internal:8080
3030
# Set this if you want to use a cert file for the proxy (e.g. when testing locally using mitmproxy and USE_HTTPS=true)
3131
# This file should be mounted. The path is absolute to the container.
32-
- PROXY_CERT_FILE=/certs/proxy.pem
32+
# - PROXY_CERT_FILE=/certs/proxy.pem
3333
# Set to true if you are using HTTPS, you will have to provide cert files (see volumes section)
34-
- USE_HTTPS=true
34+
# - USE_HTTPS=true
3535

3636
volumes:
3737
- type: bind

0 commit comments

Comments
 (0)