gitlab pypi auth
This commit is contained in:
parent
d1bc80c7f1
commit
890494d86f
|
|
@ -1,2 +1,8 @@
|
||||||
|
# Chain Service
|
||||||
|
|
||||||
DATABASE_URL=REQUIRED. Example: DATABASE_URL=mongodb://chain-service:password@127.0.0.1:27017
|
DATABASE_URL=REQUIRED. Example: DATABASE_URL=mongodb://chain-service:password@127.0.0.1:27017
|
||||||
DATABASE_NAME=OPTOINAL. Default: chain-db
|
DATABASE_NAME=OPTOINAL. Default: chain-db
|
||||||
|
|
||||||
|
# Poetry (Gitlab Auth Token for PyPi)
|
||||||
|
POETRY_USERNAME=REQUIRED
|
||||||
|
POETRY_PASSWORD=REQUIRED
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ WORKDIR /app/
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
ENV PYTHONDONTWRITEBYTECODE 1
|
ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
|
|
||||||
|
ARG POETRY_USERNAME
|
||||||
|
ARG POETRY_PASSWORD
|
||||||
|
|
||||||
RUN apk add --update --virtual .build-deps \
|
RUN apk add --update --virtual .build-deps \
|
||||||
build-base \
|
build-base \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
|
|
@ -15,6 +18,7 @@ RUN pip install poetry
|
||||||
COPY pyproject.toml poetry.lock* /app/
|
COPY pyproject.toml poetry.lock* /app/
|
||||||
|
|
||||||
RUN poetry config virtualenvs.create false
|
RUN poetry config virtualenvs.create false
|
||||||
|
RUN poetry config http-basic.gitlab ${POETRY_USERNAME} ${POETRY_PASSWORD}
|
||||||
RUN poetry install --without dev --no-interaction --no-ansi
|
RUN poetry install --without dev --no-interaction --no-ansi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,13 @@ services:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./Dockerfile
|
dockerfile: ./Dockerfile
|
||||||
|
|
||||||
|
args:
|
||||||
|
- POETRY_USERNAME=${POETRY_USERNAME}
|
||||||
|
- POETRY_PASSWORD=${POETRY_PASSWORD}
|
||||||
|
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=mongodb://chain-service:password@chain-db:27017
|
- DATABASE_URL=mongodb://chain-service:password@chain-db:27017
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user