-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile_init-db
More file actions
36 lines (26 loc) · 1.16 KB
/
Copy pathDockerfile_init-db
File metadata and controls
36 lines (26 loc) · 1.16 KB
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
FROM python:3.8-bullseye
COPY collector_module/ /app/collector_module
WORKDIR /app/collector_module
RUN pip install --upgrade pip && \
pip install --no-cache-dir --user -r requirements.txt && \
python setup.py install
RUN mkdir -p /var/log/xroad-metrics/collector/logs
RUN mkdir -p /var/log/xroad-metrics/collector/heartbeat
ENV PATH="/root/.local/bin:${PATH}"
WORKDIR /app/collector_module/bin
COPY files/init-db/change_password.py /app/collector_module/bin/change_password.py
# Define environment variables
ENV MONGO_HOST=xroad-metrics-database
ENV MONGO_PORT=27017
ENV MONGO_ROOT_USER=admin
ENV MONGO_ROOT_PASSWORD=pass
ENV XROAD_INSTANCE=SANDBOX
ENV ANALYZER_PASSWORD=default
ENV ANALYZER_INTERFACE_PASSWORD=default
ENV ANONYMIZER_PASSWORD=default
ENV COLLECTOR_PASSWORD=default
ENV CORRECTOR_PASSWORD=default
ENV REPORTS_PASSWORD=default
CMD sleep 10s && \
xroad-metrics-init-mongo --host $MONGO_HOST:$MONGO_PORT --user $MONGO_ROOT_USER --password $MONGO_ROOT_PASSWORD $XROAD_INSTANCE --dummy-passwords && \
python change_password.py --host $MONGO_HOST:$MONGO_PORT --admin_user $MONGO_ROOT_USER --admin_password $MONGO_ROOT_PASSWORD --xroad_instance $XROAD_INSTANCE