Skip to content
Permalink
Browse files
Dockerize Scorecard Server Application
  • Loading branch information
Nasser Kaze committed Aug 16, 2021
1 parent f43155e commit 973dbd9c2d4736d6fee3760ca93260f78a3afdaa
Showing 10 changed files with 62 additions and 11 deletions.
@@ -121,3 +121,5 @@ build

.settings
.project

data/
@@ -0,0 +1,10 @@
FROM python:3

COPY . app
WORKDIR /app

RUN pip install -r requirements.txt

EXPOSE 8000

ENTRYPOINT [ "/bin/bash", "entrypoint.sh"]
BIN +1.6 KB (120%) README.md
Binary file not shown.
@@ -76,7 +76,7 @@ task buildJavaSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateT
skipValidateSpec = true
inputSpec = "$openapiSpecFile"
outputDir = "$buildDir/generated/java".toString()
groupId = 'org.apache.fineract.cn'
groupId = 'org.apache.fineract'
id = 'credit-scorecard-java-client'
apiPackage = 'org.apache.fineract.credit.scorecard.services'
invokerPackage = 'org.apache.fineract.credit.scorecard'
@@ -37,7 +37,7 @@ Add this dependency to your project's POM:

```xml
<dependency>
<groupId>org.apache.fineract.cn</groupId>
<groupId>org.apache.fineract</groupId>
<artifactId>credit-scorecard-java-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
@@ -49,7 +49,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "org.apache.fineract.cn:credit-scorecard-java-client:1.0.0"
compile "org.apache.fineract:credit-scorecard-java-client:1.0.0"
```

### Others
@@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'

group = 'org.apache.fineract.cn'
group = 'org.apache.fineract'
version = '1.0.0'

buildscript {
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.fineract.cn</groupId>
<groupId>org.apache.fineract</groupId>
<artifactId>credit-scorecard-java-client</artifactId>
<packaging>jar</packaging>
<name>credit-scorecard-java-client</name>
@@ -0,0 +1,29 @@
version: "3.9"

services:
db:
image: mysql:5.7
volumes:
- ./data/db:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: skdcnwauicn2ucnaecasdsajdnizucawencascdca
MYSQL_DATABASE: fineract_credit_scorecard
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "--password=skdcnwauicn2ucnaecasdsajdnizucawencascdca" ]
timeout: 10s
retries: 10
ports:
- 4306:4306

app:
build: .
ports:
- 8000:8000
depends_on:
- db
environment:
- DB_HOST=db
- DB_PORT=4306
- DB_PASSWORD=skdcnwauicn2ucnaecasdsajdnizucawencascdca

@@ -0,0 +1,4 @@
#!/bin/bash
python manage.py migrate
python manage.py runserver 0:8000
echo Running Django on the local host at http://localhost:8000
@@ -42,10 +42,16 @@
SECRET_KEY = 'fd363ff3-ab24-476d-8409-9a45ab0300f9'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = os.environ.get('DEBUG', True),

ALLOWED_HOSTS = []

# SECURE_SSL_REDIRECT = True

# SESSION_COOKIE_SECURE = True

# CSRF_COOKIE_SECURE = True

# Application references
# https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-INSTALLED_APPS
INSTALLED_APPS = [
@@ -106,11 +112,11 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': os.environ.get('DBNAME', 'fineract_credit_scorecard'),
'USER': os.environ.get('DBUSER', 'root'),
'PASSWORD': os.environ.get('DBPASSWORD', 'mysql'),
'HOST': os.environ.get('DBHOST', '127.0.0.1'),
'PORT': os.environ.get('DBPORT', '3306'),
'NAME': os.environ.get('DB_NAME', 'fineract_credit_scorecard'),
'USER': os.environ.get('DB_USER', 'root'),
'PASSWORD': os.environ.get('DB_PASSWORD', 'mysql'),
'HOST': os.environ.get('DB_HOST', '127.0.0.1'),
'PORT': os.environ.get('DB_PORT', '3306'),
'OPTIONS': {
'read_default_file': 'MySQL.cnf',
},

0 comments on commit 973dbd9

Please sign in to comment.