Skip to content

Commit

Permalink
fix: node:18-alpine git
Browse files Browse the repository at this point in the history
  • Loading branch information
zjffun committed Sep 17, 2023
1 parent a65d2af commit 913f0fb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
NODE_LOCAL_PORT=30001
NODE_DOCKER_PORT=30001

# TODO: docker MongoDB Replica Set
MONGODB_URI=mongodb://mongodb:27017/dochub?directConnection=true
MONGODB_LOCAL_PORT=27017
MONGODB_DOCKER_PORT=27017
Expand All @@ -10,3 +11,8 @@ SECRET=DO NOT USE THIS VALUE. INSTEAD, CREATE A COMPLEX SECRET AND KEEP IT SAFE
GITHUB_CLIENT_ID=your github client id
GITHUB_CLIENT_SECRET=your github client secret
GITHUB_CALL_BACK_URL=http://127.0.0.1:3001/api/auth/github/callback

# development local MongoDB MONGODB_URI
# MONGODB_URI=mongodb://127.0.0.1:27017/dochub?directConnection=true
# Docker development local MongoDB MONGODB_URI
# MONGODB_URI=mongodb://host.docker.internal:27017/dochub?directConnection=true
7 changes: 6 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,9 @@ jobs:
sudo docker pull zjffun/dochub-server
sudo docker stop dochub-server
sudo docker remove dochub-server
sudo docker run -e DOTENV_KEY="${{ secrets.DOTENV_KEY }}" -d --restart=always --name dochub-server -p 30001:30001 zjffun/dochub-server:latest
sudo docker run --name dochub-server\
-e DOTENV_KEY="${{ secrets.DOTENV_KEY }}"\
-p 30001:30001\
-v /usr/share/com.zjffun.dochub:/usr/share/com.zjffun.dochub\
-d --restart=always\
zjffun/dochub-server:latest
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,7 @@ COPY --chown=node:node .env.vault ./
COPY --chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY --chown=node:node --from=build /usr/src/app/dist ./dist

RUN apk add git
RUN git init

CMD [ "node", "dist/main.js" ]
1 change: 1 addition & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
- .:/usr/src/app
# Prevents node_modules from being overwritten by the container
- /usr/src/app/node_modules
- /usr/share/com.zjffun.dochub:/usr/share/com.zjffun.dochub

volumes:
db:

0 comments on commit 913f0fb

Please sign in to comment.