Skip to content

Commit

Permalink
update docker files
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera committed Oct 18, 2024
1 parent 404207f commit b759f1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ COPY --from=frontend /build ./frontend
COPY ./config.json ./frontend/config.json
ENV SERVE_FRONTEND=1

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
ENV ROOT_PATH=""
# Only add --root-path if ROOT_PATH is not empty, otherwise uvicorn will throw an error
CMD uvicorn main:app --host 0.0.0.0 --port 8000 ${ROOT_PATH:+--root-path ${ROOT_PATH}}
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ version: "3"
services:
shareyourcloning:
build: .
image: shareyourcloning
image: manulera/shareyourcloning
# For eLabFTW
# image: manulera/shareyourcloning:syc-base
ports:
- "8000:8000"

Expand All @@ -17,3 +19,8 @@ services:
# IMPORTANT: Do not add a trailing slash to the URLs:
# > Do not use http://localhost:3000/, but http://localhost:3000
# - ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3001
#
# If you want to use a subpath of the domain, set ROOT_PATH,
# this is the equivalent of --root-path in uvicorn, so the routes
# without this prefix will also work (e.g. / will be the same as /syc/).
# - ROOT_PATH="/syc"

0 comments on commit b759f1d

Please sign in to comment.