Skip to content

Commit

Permalink
feat: merge branch 'develop' into deployments/staging/makerdao
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldas committed Sep 24, 2024
2 parents 0cb3cb2 + 8eebf26 commit c2adae3
Show file tree
Hide file tree
Showing 10 changed files with 1,787 additions and 331 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
# [1.0.0-dev.132](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.131...v1.0.0-dev.132) (2024-09-24)


### Features

* added detach strategy for old drives ([abb819b](https://github.com/powerhouse-inc/document-model-electron/commit/abb819b46fa66711ef8e57d6d8d7171bab7b1259))

# [1.0.0-dev.131](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.130...v1.0.0-dev.131) (2024-09-24)


### Bug Fixes

* env router basename ([4bc9267](https://github.com/powerhouse-inc/document-model-electron/commit/4bc9267bc55902ce7a6631eb76ffc8c4472892ff))

# [1.0.0-dev.130](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.129...v1.0.0-dev.130) (2024-09-23)


### Bug Fixes

* skipped operations on revision history ([7c49063](https://github.com/powerhouse-inc/document-model-electron/commit/7c49063008edf2f26413daa38095038a91299d3f))

# [1.0.0-dev.129](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.128...v1.0.0-dev.129) (2024-09-23)


### Features

* export connect as cli executable ([68f59b2](https://github.com/powerhouse-inc/document-model-electron/commit/68f59b25f3eb7fdc5e7d5907bbb1db7480777419))

# [1.0.0-dev.128](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.127...v1.0.0-dev.128) (2024-09-23)


### Bug Fixes

* base path ([9c4e94e](https://github.com/powerhouse-inc/document-model-electron/commit/9c4e94ec8399799c4e476d4e6ae248e44e9f690a))

# [1.0.0-dev.127](https://github.com/powerhouse-inc/document-model-electron/compare/v1.0.0-dev.126...v1.0.0-dev.127) (2024-09-20)


Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:lts-alpine AS builder

ARG BASE_PATH="/"
ENV BASE_PATH=${BASE_PATH}

ARG PH_CONNECT_ROUTER_BASENAME=${BASE_PATH}
ARG SENTRY_ORG=""
ENV SENTRY_ORG=${SENTRY_ORG}

Expand All @@ -27,8 +27,9 @@ WORKDIR /opt/app
ENV NODE_ENV=production
ARG PORT=80
ENV PORT=${PORT}
ARG BASE_PATH="/"
ARG BASE_PATH=""
ENV BASE_PATH=${BASE_PATH}
ENV PH_CONNECT_ROUTER_BASENAME=${PH_CONNECT_ROUTER_BASENAME}
ARG PH_CONNECT_SENTRY_DSN=""
ENV PH_CONNECT_SENTRY_DSN=${PH_CONNECT_SENTRY_DSN}
ARG PH_CONNECT_SENTRY_ENV=""
Expand Down
5 changes: 5 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node

import { startServer } from 'index';

startServer();
21 changes: 21 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import express from 'express';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

export function startServer() {
const app = express();

app.use(express.static(join(__dirname, 'dist')));

app.get('*', (req, res) => {
res.sendFile(join(__dirname, 'dist', 'index.html'));
});

const port = process.env.PORT || 3000;
app.listen(port, () => {
console.log(`Server is running on http://localhost:${port}`);
});
}
16 changes: 8 additions & 8 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ server {
add_header Cache-Control "public";
}

location ${BASE_PATH} {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
expires -1;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
}

# Health check endpoints
location /healthz {
access_log off;
Expand All @@ -83,4 +75,12 @@ server {
return 200 'OK';
add_header Content-Type text/plain;
}

location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
expires -1;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
}
}
Loading

0 comments on commit c2adae3

Please sign in to comment.