diff --git a/.gitignore b/.gitignore index e69de29..4859e60 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +deployment/.backend.secrets.env diff --git a/backend/Dockerfile b/backend/Dockerfile index 27fa7c0..930ac00 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -10,4 +10,4 @@ COPY . . EXPOSE 3000 -CMD ["npm", "run", "start"] \ No newline at end of file +CMD ["npm", "run", "deploy"] diff --git a/backend/package.json b/backend/package.json index 8308057..b96716d 100644 --- a/backend/package.json +++ b/backend/package.json @@ -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", diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml new file mode 100644 index 0000000..8fda5cc --- /dev/null +++ b/deployment/docker-compose.yml @@ -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