forked from ckaenzig/service-bdms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
76 lines (66 loc) · 1.9 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# syntax=docker/dockerfile:1
FROM swisstopo/service-bdms-base:latest
WORKDIR /usr/src/app
COPY bms ./bms
ENV SERVICE_PORT 8888
ENV DB_USERNAME postgres
ENV DB_PASSWORD postgres
ENV DB_DATABASE bdms
ENV DB_HOST swissforages-service-db
ENV DB_PORT 5432
ENV FILE_STORAGE none
# S3 configurations
ENV S3_ENDPOINT s3.amazonaws.com
ENV S3_REGION none
ENV S3_SECURE 1
ENV S3_BUCKET 0
# S3 credentials based on config file
ENV S3_CREDENTIALS_FILE none
ENV S3_CREDENTIALS_FILE_PROFILE default
# S3 credential passed manually
ENV S3_CREDENTIALS_ACCESS_KEY none
ENV S3_CREDENTIALS_SECRET_KEY none
ENV S3_CREDENTIALS_SESSION_TOKEN none
# S3 credentials retrieved from iam provider
ENV S3_CREDENTIALS_IAM 0
# SMTP Email feedback config
ENV SMTP_CONFIG none
ENV SMTP_RECIPIENTS none
ENV SMTP_USERNAME none
ENV SMTP_PASSWORD none
ENV SMTP_URL none
ENV SMTP_PORT 25
ENV SMTP_TLS 0
ENV SMTP_STARTTLS 1
CMD python -u bms/main.py \
--port=${SERVICE_PORT} \
\
--pg-auto-upgrade \
--pg-host=${DB_HOST} \
--pg-port=${DB_PORT} \
--pg-database=${DB_DATABASE} \
--pg-user=${DB_USERNAME} \
--pg-password=${DB_PASSWORD} \
\
--s3-endpoint=${S3_ENDPOINT} \
--s3-region=${S3_REGION} \
--s3-secure=${S3_SECURE} \
--s3-bucket=${S3_BUCKET} \
\
--s3-credentials-file=${S3_CREDENTIALS_FILE} \
--s3-credentials-file-profile=${S3_CREDENTIALS_FILE_PROFILE} \
\
--s3-credentials-access-key=${S3_CREDENTIALS_ACCESS_KEY} \
--s3-credentials-secret-key=${S3_CREDENTIALS_SECRET_KEY} \
--s3-credentials-session-token=${S3_CREDENTIALS_SESSION_TOKEN} \
\
--s3-credentials-iam=${S3_CREDENTIALS_IAM} \
--file-repo=${FILE_STORAGE} \
\
--smtp-recipients=${SMTP_RECIPIENTS} \
--smtp-username=${SMTP_USERNAME} \
--smtp-password=${SMTP_PASSWORD} \
--smtp-server=${SMTP_URL} \
--smtp-port=${SMTP_PORT} \
--smtp-tls=${SMTP_TLS} \
--smtp-starttls=${SMTP_STARTTLS}