add deployment

This commit is contained in:
decentral1se 2021-12-31 10:10:39 +01:00
parent de2e5364c2
commit cb31e41c93
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
5 changed files with 55 additions and 4 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
.git
node_modules
public

6
.gitignore vendored
View File

@ -1,6 +1,6 @@
*.lock
.netlify
TODO
node_modules
public
resources
# Local Netlify folder
.netlify
TODO

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM node:16-bullseye-slim
WORKDIR src
COPY . /src/
RUN npm install
EXPOSE 1313
CMD ["npm", "run", "start"]

View File

@ -2,4 +2,19 @@
> WIP: proof-of-concept for a new home site
`npm install & npm run start` (requires node 16.x, npm 8.x, see [`nvm`](https://github.com/nvm-sh/nvm)).
## Hacking
`npm install & npm run start`
Requires node 16.x, npm 8.x, see [`nvm`](https://github.com/nvm-sh/nvm)).
## Deploy
```
docker build -t thecoopcloud/beta.coopcloud.tech .
docker push thecoopcloud/beta.coopcloud.tech
docker context use mellor.coopcloud.tech
docker stack deploy -c compose.yml beta_coopcloud_tech
```
Manual for now.

22
compose.yml Normal file
View File

@ -0,0 +1,22 @@
---
version: "3.8"
services:
app:
image: "thecoopcloud/beta.coopcloud.tech:latest"
networks:
- proxy
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.services.beta_coopcloud_tech.loadbalancer.server.port=1313"
- "traefik.http.routers.beta_coopcloud_tech.rule=Host(`beta.coopcloud.tech`)"
- "traefik.http.routers.beta_coopcloud_tech.entrypoints=web-secure"
- "traefik.http.routers.beta_coopcloud_tech.tls.certresolver=production"
networks:
proxy:
external: true