-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from EGA-archive/pipeline-components
Refactoring pipeline components
- Loading branch information
Showing
43 changed files
with
1,179 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
db | ||
mq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM postgres:12.1-alpine | ||
|
||
LABEL maintainer "EGA System Developers" | ||
LABEL org.label-schema.schema-version="2.1" | ||
LABEL org.label-schema.vcs-url="https://github.com/EGA-archive/LocalEGA" | ||
|
||
ENV SSL_SUBJ /C=ES/ST=Spain/L=Barcelona/O=CRG/OU=SysDevs/CN=LocalEGA/emailAddress=dev.ega@crg.eu | ||
ENV TZ Europe/Madrid | ||
ENV PGDATA /ega/data | ||
|
||
EXPOSE 5432 | ||
VOLUME /ega/data | ||
|
||
RUN apk add --no-cache openssl | ||
|
||
|
||
RUN mkdir -p /etc/ega/initdb.d && \ | ||
mkdir -p /var/run/postgresql && \ | ||
chmod 2775 /var/run/postgresql | ||
|
||
COPY pg.conf /etc/ega/pg.conf.default | ||
COPY initdb.d /etc/ega/initdb.d | ||
|
||
RUN chown -R postgres /etc/ega && \ | ||
chown -R postgres /var/run/postgresql | ||
|
||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||
RUN chmod 755 /usr/local/bin/entrypoint.sh | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# LocalEGA database definitions and docker image | ||
|
||
We use | ||
[Postgres 12.1](https://github.com/docker-library/postgres/tree/0d0485cb02e526f5a240b7740b46c35404aaf13f/12/alpine) | ||
and Alpine 3.10. | ||
|
||
Security is hardened: | ||
- We do not use 'trust' even for local connections | ||
- Requiring password authentication for all | ||
- Using scram-sha-256 is stronger than md5 | ||
- Enforcing TLS communication | ||
- Enforcing client-certificate verification | ||
|
||
## Configuration | ||
|
||
There are 2 users (`lega_in` and `lega_out`), and 2 schemas | ||
(`local_ega` and `local_ega_download`). | ||
|
||
The following environment variables can be used to configure the database: | ||
|
||
| Variable | Description | Default value | | ||
|------------------------:|:---------------------------------|:--------------| | ||
| PGDATA | The data directory | `/ega/data` | | ||
| DB\_LEGA\_IN\_PASSWORD | `lega_in`'s password | - | | ||
| TZ | Timezone for the Postgres server | Europe/Madrid | | ||
|
||
|
||
<a title="See Initialization scripts" href="https://hub.docker.com/_/postgres">As usual</a>, include your own `.sh`, `.sql` or `.sql.gz` files in `/docker-entrypoint-initdb.d/` in order to have them included at initialization time. | ||
|
||
## TLS support | ||
|
||
| Variable | Description | Default value | | ||
|-----------------:|:-------------------------------------------------|:-------------------| | ||
| PG\_SERVER\_CERT | Public Certificate in PEM format | `/etc/ega/pg.cert` | | ||
| PG\_SERVER\_KEY | Private Key in PEM format | `/etc/ega/pg.key` | | ||
| PG\_CA | Public CA Certificate in PEM format | `/etc/ega/CA.cert` | | ||
| PG\_VERIFY\_PEER | Enforce client verification | 0 | | ||
| SSL\_SUBJ | Subject for the self-signed certificate creation | `/C=ES/ST=Spain/L=Barcelona/O=CRG/OU=SysDevs/CN=LocalEGA/emailAddress=all.ega@crg.eu` | | ||
|
||
If not already injected, the files located at `PG_SERVER_CERT` and `PG_SERVER_KEY` will be generated, as a self-signed public/private certificate pair, using `SSL_SUBJ`. | ||
|
||
Client verification is enforced if and only if `PG_CA` exists and `PG_VERIFY_PEER` is set to `1`. | ||
|
Oops, something went wrong.