Skip to content

Commit

Permalink
Fix nginx and docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
ggodlewski committed Oct 22, 2023
1 parent 82f32b9 commit d867e42
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/DevelopServerDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
-v /home/githubactions/wikigdrive/service_account.json:/service_account.json \
-v /home/githubactions/wikigdrive/env.develop:/usr/src/app/.env \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "/var/www/dev.wikigdrive.com:/usr/src/app/dist/hugo" \
-e "GIT_SHA=${GITHUB_SHA}" \
-e "ZIPKIN_URL=https://dev.wikigdrive.com/zipkin" \
-e "ZIPKIN_SERVICE=wikigdrive-develop" \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ProdServerDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
-v /home/githubactions/wikigdrive/service_account.json:/service_account.json \
-v /home/githubactions/wikigdrive/env.prod:/usr/src/app/.env \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "/var/www/wikigdrive.com:/usr/src/app/dist/hugo" \
-e "GIT_SHA=${GITHUB_SHA}" \
--publish 127.0.0.1:3000:3000 \
--restart unless-stopped \
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN npm link --location=user
EXPOSE 3000
VOLUME /data

RUN cd /usr/src/app/apps/ui && cp ../../hugo/themes/wgd-bootstrap/layouts/_default/baseof.html index.html && npm install && npm run build
RUN cp /usr/src/app/dist/hugo/ui/index.html /usr/src/app/index.html || cp /usr/src/app/hugo/themes/wgd-bootstrap/layouts/_default/baseof.html /usr/src/app/index.html
RUN cd /usr/src/app/apps/ui && npm install && npm run build

WORKDIR "/usr/src/app"

Expand Down
2 changes: 1 addition & 1 deletion src/containers/server/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const MAIN_DIR = __dirname + '/../../..';

export async function handleStaticHtml(app: express.Application, reqPath: string, url: string) {
const hugoPath = path.resolve(MAIN_DIR, 'dist', 'hugo', (reqPath.substring(1) || 'index.html'));
const generatedHtmlPath = path.resolve(MAIN_DIR, 'dist', 'hugo', 'index.html');
const generatedHtmlPath = path.resolve(MAIN_DIR, 'dist', 'hugo', 'ui', 'index.html');
const distPath = path.resolve(HTML_DIR, 'dist');
const baseHtmlPath = path.resolve(MAIN_DIR, 'hugo', 'themes', 'wgd-bootstrap', 'layouts', '_default', 'baseof.html');

Expand Down
3 changes: 3 additions & 0 deletions website/ui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
# ui/index.html
---

0 comments on commit d867e42

Please sign in to comment.