Skip to content

Commit

Permalink
Fixed envs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-milburn committed Nov 17, 2024
1 parent 0abe652 commit 9c6e18e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deployment/.backend.secrets.env
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ COPY . .

EXPOSE 3000

CMD ["npm", "run", "start"]
CMD ["npm", "run", "deploy"]
3 changes: 2 additions & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"main": "app.js",
"scripts": {
"dev": "nodemon --env-file=cfg/.env app.js",
"start": "node --env-file=cfg/.env app.js"
"start": "node --env-file=cfg/.env app.js",
"deploy": "node app.js"
},
"author": "",
"license": "ISC",
Expand Down
16 changes: 16 additions & 0 deletions deployment/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3.8'
services:
frontend:
image: ghcr.io/jhaworth21/hacksheffield-9/frontend:latest
ports:
- "6002:5173"
# - "5173:6002"

backend:
image: ghcr.io/jhaworth21/hacksheffield-9/backend:latest
ports:
- "3000:6001"
env_file:
- .backend.secrets.env
environment:
- DEPLOYED=true

0 comments on commit 9c6e18e

Please sign in to comment.