Skip to content

Commit

Permalink
docs: Add docker-compose.yml (#17)
Browse files Browse the repository at this point in the history
* Add docker compose

* Update readme to with docker compose and fix typos / consistent format
  • Loading branch information
kenneth-fossen authored Apr 30, 2024
1 parent 75282cf commit f67f3c1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
8 changes: 8 additions & 0 deletions docs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3.8"
services:
aa-slides:
build:
context: .
dockerfile: Dockerfile
ports:
- 8080:8080
32 changes: 23 additions & 9 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,39 @@ The contents of the slide deck are contained in a set of markdown file in the [`
- To host the files, you can use the "Live Server" plugin to VSCode.
- Press to "Go Live" icon toolbar bottom right, and the port 5500 is forwarded to your client.

(In order to be able to use the automatic reload up-on changes the 'unsafe-inline' needs to be added to the CSP in ``index.html``. Remember to remove before before making commits.)
(In order to be able to use the automatic reload up-on changes the 'unsafe-inline' needs to be added to the CSP in ``index.html``. Remember to remove before making commits.)

### Github Pages
### GitHub Pages

The slide deck is also served using Github Pages at [https://equinor.github.io/appsec-fundamentals-authn-authz-cs](https://equinor.github.io/appsec-fundamentals-authn-authz-cs)


### Docker

- `docker build -t aa-slides .`
- `docker run -d -p 8080:8080 aa-slides`
#### Docker Compose

```sh
# start (-d can be omitted)
docker compose up -d
# stop
docker compose down
```

#### Manual build

```sh
docker build -t aa-slides .
docker run -d -p 8080:8080 aa-slides
```

### SRI - Integrity check for own provided source files

To provide a hash for the .js and .css file provided in the source do:
To provide a hash for the `.js` and `.css` file provided in the source, do:

- `cat ./content/js/app.js | openssl dgst -sha512 -binary | openssl base64 -A`
- `cat ./content/css/equinor.css | openssl dgst -sha512 -binary | openssl base64 -A`
- `curl https://file-to-download | openssl dgst -sha512 -binary | openssl base64 -A`
```sh
cat ./content/js/app.js | openssl dgst -sha512 -binary | openssl base64 -A
cat ./content/css/equinor.css | openssl dgst -sha512 -binary | openssl base64 -A
curl https://file-to-download | openssl dgst -sha512 -binary | openssl base64 -A
```

... and so on.

Expand Down

0 comments on commit f67f3c1

Please sign in to comment.