chore: allow image server mode to be chosen via env var
parent
5247fee979
commit
053afac5e9
|
@ -4,7 +4,7 @@
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y libssl1.1 libgcc1 libc6 ca-certificates --no-install-recommends \
|
&& apt-get install -y libssl1.1 libgcc1 libc6 ca-certificates gettext-base --no-install-recommends \
|
||||||
&& rm -rf /var/lib/{apt,dpkg,cache,log}
|
&& rm -rf /var/lib/{apt,dpkg,cache,log}
|
||||||
|
|
||||||
RUN groupadd -g 1500 rust \
|
RUN groupadd -g 1500 rust \
|
||||||
|
@ -15,10 +15,13 @@ USER rust
|
||||||
RUN mkdir ~/.influxdb_iox
|
RUN mkdir ~/.influxdb_iox
|
||||||
RUN ls -la ~/.influxdb_iox
|
RUN ls -la ~/.influxdb_iox
|
||||||
|
|
||||||
|
ENV INFLUXDB_IOX_SERVER_MODE=database
|
||||||
|
|
||||||
|
COPY docker/entrypoint.sh /usr/bin/entrypoint.sh
|
||||||
COPY target/release/influxdb_iox /usr/bin/influxdb_iox
|
COPY target/release/influxdb_iox /usr/bin/influxdb_iox
|
||||||
|
|
||||||
EXPOSE 8080 8082
|
EXPOSE 8080 8082
|
||||||
|
|
||||||
ENTRYPOINT ["influxdb_iox"]
|
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["run", "database"]
|
CMD ["run", "$INFLUXDB_IOX_SERVER_MODE"]
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
args=( "$@" )
|
||||||
|
for i in "${!args[@]}"; do
|
||||||
|
args[$i]="$(echo "${args[$i]}" | envsubst)"
|
||||||
|
done
|
||||||
|
|
||||||
|
exec influxdb_iox "${args[@]}"
|
Loading…
Reference in New Issue