Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/docker image improvement #64

Open
wants to merge 3 commits into
base: development/3.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
venv
*.pyc
*~
.git
*.egg-info
__pycache__
.eggs
.tox
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: release

on:
on:
workflow_dispatch:
inputs:
tag:
Expand Down Expand Up @@ -33,6 +33,8 @@ jobs:
file: ./Dockerfile
push: true
tags: "registry.scality.com/bert-e/bert-e:${{ github.event.inputs.tag }}"
build-args: |
VERSION=${{ github.event.inputs.tag }}

- name: Create Release
uses: softprops/action-gh-release@v1
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [3.6.21] - 2022-08-08
# Fixed
- Fixed configuration for Webhook authentication.

## [3.6.21] - 2022-08-05
# Added
- Making reverse proxy configuration through env.
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM python:3.6.6-slim-stretch

ARG VERSION 1.0-dev

ENV VERSION=${VERSION}

RUN apt-get update && apt-get install git -y && rm -rf /var/cache/apt

COPY constraints.txt requirements.txt /app/
Expand All @@ -13,6 +17,6 @@ VOLUME '/root/.bert-e'
WORKDIR /app/

COPY . /app/
RUN pip install --no-deps /app
RUN pip install --no-deps .

ENTRYPOINT ["bert-e-serve"]
4 changes: 2 additions & 2 deletions bert_e/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ def setup_server(bert_e):
"""Create and configure Flask server app."""
app = Flask(__name__)

app_prefix = os.getenv('APP_PREFIX', '/')
app_prefix = os.getenv('APP_PREFIX', None)
app_scheme = os.getenv('APP_SCHEME', None)
app_server = os.getenv('APP_SERVER', None)
app.config.update({
'WEBHOOK_LOGIN': os.environ['WEBHOOK_LOGIN'],
'WEBHOOK_PWD': os.environ['WEBHOOK_LOGIN'],
'WEBHOOK_PWD': os.environ['WEBHOOK_PWD'],
'CLIENT_ID': os.environ['BERT_E_CLIENT_ID'],
'CLIENT_SECRET': os.environ['BERT_E_CLIENT_SECRET'],
'WTF_CSRF_SECRET_KEY': secrets.token_hex(24),
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ PyYAML==3.13
raven==6.9.0
requests==2.19.1
requests-mock==1.5.2
wheel==0.32.1
werkzeug==0.16.1
WTForms==2.2.1
setuptools-scm==1.9.0
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3

import os
from os.path import abspath, dirname, join
import pip

Expand Down Expand Up @@ -36,12 +37,9 @@ def requires():

setup(
name='bert-e',
use_scm_version={
'local_scheme': 'dirty-tag'
},
setup_requires=[
'setuptools_scm'
],
version=os.getenv('VERSION', '1.0-dev'),
python_requires=">=3.6",
platforms=['any'],
description='Scality\'s automated branch merging tool',
url='https://bitbucket.org/scality/bert-e',
license='Apache',
Expand Down