Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
examples/
proxy/certs/
*.sh
*.sh
.DS_Store
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,32 @@ Note that regardless of VCS, the existence of an organisation called *Phenoflow*

Note: An example [reverse proxy](proxy) is available to demonstrate how to front Phenoflow's services, and assumes the presence of the importer, generator and a [Gitea instance](docker-compose.dev.yml).

### macOS / Linux

If you are running on macOS or Linux, you may need to explicitly convert scripts to use `\n` (UNIX) line endings instead of `\r\n` (Windows).

From the root `phenoflow` directory, run:

```
find . -type f -name "*.sh" -print0 | xargs -0 dos2unix
```

### Certificate generation

1. Run [proxy/certs/gen-ca-cert.sh](proxy/certs/gen-ca-cert.sh).
2. Run [proxy/certs/gen-domain-cert.sh](proxy/certs/gen-domain-cert.sh).
3. Copy proxy/certs/phenoflow.* to [importer/certs](importer/certs).
4. Run [importer/certs/gen-domain-cert.sh](importer/certs/gen-domain-cert.sh).
5. Copy proxy/certs/phenoflow.* to [generator/certs](generator/certs).
6. Run [generator/certs/gen-domain-cert.sh](generator/certs/gen-domain-cert.sh).
7. Copy proxy/certs/phenoflow.* to [parser/certs](parser/certs).
8. Run [parser/certs/gen-domain-cert.sh](parser/certs/gen-domain-cert.sh).
Run the following steps from the `phenoflow` root folder:

1. Change to the `proxy/certs/` directory
2. Run [proxy/certs/gen-ca-cert.sh](proxy/certs/gen-ca-cert.sh).
3. Run [proxy/certs/gen-domain-cert.sh](proxy/certs/gen-domain-cert.sh).
4. Change to the `importer/certs/` direcctory
5. Copy proxy/certs/phenoflow.* to [importer/certs](importer/certs).
6. Run [importer/certs/gen-domain-cert.sh](importer/certs/gen-domain-cert.sh).
7. Change to the `generator/certs` directory
8. Copy proxy/certs/phenoflow.* to [generator/certs](generator/certs).
9. Run [generator/certs/gen-domain-cert.sh](generator/certs/gen-domain-cert.sh).
10. Change to the `parser/certs` directory
11. Copy proxy/certs/phenoflow.* to [parser/certs](parser/certs).
12. Run [parser/certs/gen-domain-cert.sh](parser/certs/gen-domain-cert.sh).

## Install, run and deploy

Expand Down
10 changes: 5 additions & 5 deletions importer/db/encrypt/keys/db-encryption.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
echo -n "1;" >> keyfile
sudo openssl rand -hex 32 >> keyfile
openssl rand -hex 32 >> keyfile
echo -n "2;" >> keyfile
sudo openssl rand -hex 32 >> keyfile
openssl rand -hex 32 >> keyfile
echo -n "100;" >> keyfile
sudo openssl rand -hex 32 >> keyfile
sudo openssl rand -hex 128 > keyfile.key
sudo openssl enc -aes-256-cbc -md sha1 -pass file:keyfile.key -in keyfile -out keyfile.enc
openssl rand -hex 32 >> keyfile
openssl rand -hex 128 > keyfile.key
openssl enc -aes-256-cbc -md sha1 -pass file:keyfile.key -in keyfile -out keyfile.enc
rm keyfile