Skip to content

Commit

Permalink
Merge pull request #89 from ssciwr/vm_readme
Browse files Browse the repository at this point in the history
Add links to temporary VM to readme
  • Loading branch information
lkeegan authored Sep 25, 2024
2 parents c12c462 + d782451 commit 18fccb8
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
36 changes: 36 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Deployment

Some information on how to deploy the website - currently it is deployed on a temporary heicloud VM.

## Production deployment

Production docker container images are automatically built by CI.
To deploy the latest version on a virtual machine with docker compose installed,
download [docker-compose.yml](https://raw.githubusercontent.com/ssciwr/mondey/main/docker-compose.yml), then do

```
sudo docker compose pull
sudo docker compose up -d
```

The location of the database directory, image files directory, SSL keys and secret key should be set
either in env vars or in a file `.env` in the same location as the docker-compose.yml.

TODO: document these options

The current status of the containers can be checked with

```
sudo docker compose ps
sudo docker compose logs
```

### Give users admin rights

To make an existing user with email `user@domain.com` into an admin, modify the users database, e.g.

```
sqlite3 db/users.db
sqlite> UPDATE user SET is_superuser = 1 WHERE email = 'user@domain.com';
sqlite> .quit
```
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,24 @@

Initial development for the MONDEY project.

The static website is automatically built and deployed to
## Frontend

The frontend is automatically built and deployed as a static website to
[ssciwr.github.io/mondey](https://ssciwr.github.io/mondey)
on every push to the main branch using this [Github Action](.github/workflows/deploy.yml).

## Component demos
### Component demos

- [Milestone](https://ssciwr.github.io/mondey/milestone)
- [Milestonegroup](https://ssciwr.github.io/mondey/milestonegroup)

## Preview

A preview of the full website including the admin interface backend is temporarily hosted on a heicloud VM during development:

- [Mondey website](http://129.206.6.74/)
- [Mondey admin](http://129.206.6.74/admin)
- [API documentation](http://129.206.6.74/api/redoc)
- [Swagger UI to interact with API](http://129.206.6.74/api/docs)

(Note: for now this is unsecured http with public API interfaces for convenience during development, the production server would have https and the api interfaces would not be public)
3 changes: 2 additions & 1 deletion mondey_backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ The first admin user can only be created by modifying the database directly.
After you have registered a user using the swagger UI, you can promote them to an admin user with e.g.:

```bash
sqlite3 users.db
sqlite3 db/users.db
sqlite> UPDATE user SET is_superuser = 1 WHERE email = 'youremail@yourdomain.com';
sqlite> .quit
```

## Configuration
Expand Down

0 comments on commit 18fccb8

Please sign in to comment.