Skip to content

Commit 274e8ce

Browse files
committed
Serve via nginx
1 parent 0a18ea0 commit 274e8ce

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ jobs:
7070
docker stop qanswer-doc-container || true && docker rm qanswer-doc-container || true
7171
docker pull ghcr.io/the-qa-company/qanswer-doc:latest@${{ needs.build.outputs.digest }}
7272
docker rmi $(docker images -f dangling=true -q) || true
73-
docker run -p 3001:3000 -d --name qanswer-doc-container ghcr.io/the-qa-company/qanswer-doc:latest@${{ needs.build.outputs.digest }}
73+
docker run -p 3001:80 -d --name qanswer-doc-container ghcr.io/the-qa-company/qanswer-doc:latest@${{ needs.build.outputs.digest }}

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ RUN npm run build
1919
EXPOSE 3000
2020
# CMD ["serve","-s","build"]
2121

22-
CMD ["npx", "http-server", "build", "-p", "3000"]
22+
#CMD ["npx", "http-server", "build", "-p", "3000"]
23+
24+
FROM nginx:stable-alpine as deploy
25+
WORKDIR /home/node/app
26+
# Copy what we've installed/built from production
27+
COPY --chown=node:node --from=qanswer-doc-build /app/build /usr/share/nginx/html/

0 commit comments

Comments
 (0)