Skip to content

Commit

Permalink
Merge pull request #31 from deNBI/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
eKatchko authored Mar 5, 2021
2 parents 3590985 + f671ea9 commit be320d6
Show file tree
Hide file tree
Showing 16 changed files with 874 additions and 695 deletions.
2 changes: 2 additions & 0 deletions .default.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ INFLUXDB_USER=prometheus
INFLUXDB_USER_PASSWORD=secret
INFLUXDB_DB=portal_prometheus

API_KEY="change-me-but-not-to-123"

# Semicolon-separated list of project/group names.
# If set only those will be billed
# OS_CREDITS_PROJECT_WHITELIST
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM python:3.9.1-alpine as builder
FROM python:3.9.2-alpine as builder

ADD src /code/src
ADD pyproject.toml poetry.lock /code/
WORKDIR /code
RUN apk add gcc musl-dev python3-dev libffi-dev openssl-dev
RUN apk add gcc musl-dev python3-dev libffi-dev openssl-dev cargo
RUN pip install poetry && poetry build -f wheel

# by using a build container we prevent us from carrying around poetry
# alongside its dependencies
FROM python:3.9.1-alpine
FROM python:3.9.2-alpine
ARG OS_CREDITS_VERSION
ARG WHEEL_NAME=os_credits-1.1.0-py3-none-any.whl
EXPOSE 80
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Expected to be called with `--volume $(PWD)/src:/code/src:ro`
# Uses `adev` from `aiohttp-devtools` to restart the application on any code change
FROM python:3.9.1-alpine
FROM python:3.9.2-alpine

ADD src /code/src
ADD pyproject.toml poetry.lock /code/
WORKDIR /code
RUN apk update && apk --no-cache add gcc wget linux-headers musl-dev libffi-dev libressl-dev
RUN pip install --no-cache poetry
RUN apk -U upgrade && apk --no-cache add gcc wget linux-headers musl-dev libffi-dev libressl-dev cargo
RUN pip install cryptography
RUN pip install poetry
# install to system
RUN poetry config virtualenvs.create false
# we do not need any development packages except aiohttp-devtools to
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
- MAIL_SMTP_SERVER=smtp_server
- MAIL_NOT_STARTTLS=1
- INFLUXDB_HOST=influxdb
- API_KEY
ports:
- "8002:80"
depends_on:
Expand Down
Loading

0 comments on commit be320d6

Please sign in to comment.