https://github.com/dobschal/edition-bohemica
Webseite für den Verlag edition bohemica.
https://github.com/dobschal/edition-bohemica
javascript nodejs vuejs website
Last synced: about 2 months ago
JSON representation
Webseite für den Verlag edition bohemica.
- Host: GitHub
- URL: https://github.com/dobschal/edition-bohemica
- Owner: dobschal
- Created: 2018-08-10T08:49:19.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-29T18:48:44.000Z (almost 2 years ago)
- Last Synced: 2024-08-30T11:13:53.544Z (almost 2 years ago)
- Topics: javascript, nodejs, vuejs, website
- Language: Vue
- Homepage: https://edition-bohemica.de
- Size: 53.9 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# _edition bohemica_

> App should be available here: [Edition Bohemica](https://edition-bohemica.de)
## Hosting
There is a Hetzner VM running with Docker and Ubuntu.
Domain lay at IONOS and have a DNS A record pointing to the VM.
## CI Deployment via GitHub Pipeline
Check the workflow in the .github folder.
It connects to the Hetzner VM via SSH, fetches the latest changes, builds the docker image and restarts the server.
## Deployment via Docker
First create a volume to have the MongoDB and uploads persisted:
```bash
docker volume create db-volume
docker volume create uploads-volume
```
Create the docker network:
```bash
docker network create edition-bohemica
```
Then start the MongoDB containers via docker compose:
```bash
docker compose up -d
```
Inside the docker compose file, there is a path to an old backup of the mongodb. That is copied as a volume into the container.
Open a shell in the container and restore the backup:
```bash
docker exec -it mongodb sh
mongorestore --verbose --db edition-bohemica /dump/edition-bohemica
```
Then start the server container:
```
Interact with mongodb
```bash
# Move into docker container
docker exec -it mongodb sh
# open mongo shell
mongo
# show databases
show databases
```
The URL in the server app to the mongo db needs to be changed to `mongodb://mongodb:27017/edition-bohemica`.
Because the network is setup via Docker.
### Backups
Checkout the backup.sh script. It copies all relevant files into `~/backups` on the machine.
In the standard ubuntu cron job folder, a SH script exists, to make the backups.
## Nginx
We are just using the Node exposed port 3000 and redirecting it via Nginx to the domain.
There are no static files served via Nginx.
## SSL Certificates
We use certbot with letsencrypt to get the certificates.
https://www.youtube.com/watch?v=ghZXFyIyK1o
The certs are renewed automatically via a cronjob.