Added .env file

This commit is contained in:
2023-05-07 13:03:15 +02:00
parent ab14ca65c5
commit 91537cdac3
3 changed files with 16 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
weather_weather_api_base_url=
weather_weather_api_key=
weather_influx_db_base_url=
weather_influx_db_token=
weather_latitude=
weather_longitude=

View File

@@ -1,9 +1,9 @@
FROM rust:1.61.0 as builder
# 2. Copy the files in your machine to the Docker image
COPY ./ ./
FROM rust:1.67 as builder
WORKDIR /usr/src/weather
COPY . .
RUN cargo install --path .
# Build your program for release
RUN cargo build --release
# Run the binary
CMD ["./target/release/test_weather_data"]
FROM debian:bullseye-slim as runtime-base
RUN apt-get update && apt-get install -y libssl1.1 ca-certificates libsasl2-dev && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/weather /usr/local/bin/weather
CMD ["weather"]

View File

@@ -1,3 +1,5 @@
#!/usr/bin/env bash
docker build . -t weather-microservice:latest
docker tag weather-microservice:latest registry.willemserruys.com/weather-microservice:latest
docker push registry.willemserruys.com/weather-microservice:latest