Skip to content

Commit

Permalink
docker-compose added and hugo base version fix
Browse files Browse the repository at this point in the history
  • Loading branch information
deprov447 committed Mar 26, 2024
1 parent 6e3d009 commit 30e6f6b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
FROM klakegg/hugo:alpine AS website-build
FROM klakegg/hugo:0.97.1-alpine AS website-build

WORKDIR /app

COPY ./src/frontend .
RUN hugo

#########################################

FROM node:alpine AS server-build
ENV NODE_ENV=production

WORKDIR /app

COPY package.json .
RUN npm install

COPY . .
COPY src src
RUN rm -rf src/frontend
COPY --from=website-build /app/public ./src/frontend/public

CMD ["npm","start"]
CMD ["npm","start"]
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: median-api
services:
mongo:
container_name: mongo
image: mongo
ports:
- 27017:27017
median-api:
container_name: median-api
ports:
- 8000:8000
environment:
- PORT=8000
- DB_ADDR=mongodb://mongo:27017/mediandb
- SECRET=jwtsecret
links:
- mongo:mongo
image: median-api

0 comments on commit 30e6f6b

Please sign in to comment.