Skip to content

Commit

Permalink
fix(backend): remove shell wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
t03i committed Nov 11, 2024
1 parent 3fde1ed commit 3e42296
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
target: /app/app/
- action: rebuild
path: backend/pyproject.toml
command: "fastapi DEV --host 0.0.0.0 --port 8000 app/main.py"
command: ["fastapi", "dev", "--host", "0.0.0.0", "--port", "8000", "app/main.py"]
labels:
caddy_0: http://localhost
caddy_0.@match.path: /api /api/* /docs /docs/* /redoc /redoc/*
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
caddy_0.log.output.roll_size: 10MiB
caddy_0.log.output.roll_keep: 10
caddy_0.log.output.roll_keep_for: 720h
volumes:
volumes: !override
- tmvis_data:/app/data

volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
restart: always
networks:
- caddy
command: "fastapi run --host 0.0.0.0 --port 8000 --proxy-headers app/main.py"
command: ["fastapi", "run", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "app/main.py"]
env_file:
- .env
environment:
Expand Down
6 changes: 3 additions & 3 deletions scripts/backend-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ fi

echo "Starting with UID: $PUID, GID: $PGID"

groupadd -g "$PGID" usergroup
useradd -u "$PUID" -g "$PGID" -m -s /bin/bash user
getent group usergroup >/dev/null 2>&1 || groupadd -g "$PGID" usergroup
getent passwd user >/dev/null 2>&1 || useradd -u "$PUID" -g "$PGID" -m -s /bin/bash user

# Change ownership of the volume
chown -R user:usergroup /app

# Execute the command as user
exec gosu user "sh -c '$@'"
exec gosu user "$@"

0 comments on commit 3e42296

Please sign in to comment.