-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
30 lines (24 loc) · 916 Bytes
/
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
FROM postgis/postgis:16-3.4 as pg
LABEL maintainer="OpenAQ"
# defaults that may be overwritten by env
ENV POSTGIS_MAJOR 3
ENV POSTGRESQL_MAJOR 16
ENV PGUSER postgres
ENV PGDATABASE postgres
ENV PGHOST localhost
ENV POSTGRES_DB postgres
ENV POSTGRES_USER postgres
ENV POSTGRES_PASSWORD postgres
ENV DATABASE_DB openaqdev
ENV DATABASE_READ_USER postgresread
ENV DATABASE_READ_PASSWORD postgresdev
ENV DATABASE_WRITE_USER postgreswrite
ENV DATABASE_WRITE_PASSWORD postgresdev
COPY --chown=postgres:postgres ./openaqdb/ /openaqdb/
EXPOSE 5432
# Docker image will automatically run scripts in `/docker-entrypoint-initdb.d`
RUN mkdir -p /docker-entrypoint-initdb.d \
&& echo "#!/bin/bash" >/docker-entrypoint-initdb.d/001_initdb.sh \
&& echo "/openaqdb/init.sh" >> /docker-entrypoint-initdb.d/001_initdb.sh \
&& echo "/openaqdb/mock.sh" >> /docker-entrypoint-initdb.d/001_initdb.sh
WORKDIR /openaqdb