-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better docker-compose framework (#51)
* Include nginx webserver and proxy client and server through * Serve SvelteKit's production, optimised build * Rewrite paths * Do away with one service: UI is static, proxy passes the API at /api * Use process.env variables, close #46 * Use environment variables, attempt to improve nginx * Don't leave requests hanging if verification not possible. Close #53 * Local dev setup uses Vite proxy to replicate Docker/nginx config * Bump version number * Silence nginx access log * Fix typings
- Loading branch information
1 parent
5288151
commit 886370e
Showing
15 changed files
with
127 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
gui/ | ||
ui/ | ||
node_modules/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
FROM node:14.16.1-alpine3.12 | ||
|
||
FROM node:14.16.1-alpine3.12 as builder | ||
LABEL version="0.1" | ||
LABEL description="GUI from the QLDB ledger" | ||
|
||
WORKDIR /web | ||
COPY ["package.json", "package-lock.json", "./"] | ||
RUN npm install | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm install | ||
RUN node node_modules/esbuild/install.js | ||
RUN npm run build | ||
|
||
EXPOSE 8000 | ||
ENV HOST=0.0.0.0 | ||
FROM nginx:alpine | ||
COPY --from=builder /app/out /assets | ||
|
||
CMD ["npm", "run", "dev"] | ||
COPY ./default.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
upstream endpoint { | ||
server endpoint:3000; | ||
} | ||
|
||
server { | ||
listen 80; | ||
client_max_body_size 64M; | ||
client_body_buffer_size 64M; | ||
|
||
location / { | ||
root /assets; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location /api { | ||
rewrite /api/(.*) /$1 break; | ||
proxy_pass http://endpoint; | ||
proxy_buffering off; | ||
proxy_request_buffering off; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters