Skip to content

Commit

Permalink
Fix loading media files in docker setup deployment
Browse files Browse the repository at this point in the history
Make vite proxy the backend under the media prefix aswell and
make the backend use the vite port by default for the media
base url.
  • Loading branch information
rroohhh committed Jul 26, 2023
1 parent ad1a3dc commit 5b9096f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ worker/transcribee_worker/.data
backend/__pypackages__
worker/__pypackages__
frontend/node_modules/
packaging/Dockerfile
1 change: 1 addition & 0 deletions frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export default defineConfig({
proxy: {
'/api': 'http://127.0.0.1:8000',
'/api/v1/documents/sync': { target: 'http://127.0.0.1:8000', ws: true },
'/media': 'http://127.0.0.1:8000',
},
},
plugins: [
Expand Down
3 changes: 2 additions & 1 deletion packaging/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ RUN nix-shell packaging/shell.nix --command ./packaging/install_dependencies.sh
RUN nix-shell packaging/shell.nix --command ./packaging/setup_backend.sh

EXPOSE 5173
EXPOSE 8000

ENV MEDIA_URL_BASE=http://localhost:5173/

ENTRYPOINT [ "nix-shell", "packaging/shell.nix", "--command" ]

Expand Down

0 comments on commit 5b9096f

Please sign in to comment.