Skip to content

Commit cb15197

Browse files
author
jmrivas
committed
- Updated Dockerfile
- Added absolute path for sqlite database in config.yml and config-test-yml - Updated requirements
1 parent ffbbd03 commit cb15197

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
FROM python:3.6.4-alpine3.7
22

3-
RUN apk add --update curl gcc g++ git libffi-dev openssl-dev python3-dev \
3+
RUN apk add --update curl gcc g++ git libffi-dev openssl-dev python3-dev build-base linux-headers \
44
&& rm -rf /var/cache/apk/*
55
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
66

77
ENV PYTHONUNBUFFERED=1 ENVIRONMENT=pre APP_HOME=/microservice/
8+
ENV CONFIGMAP_FILE="$APP_HOME"tests/config-tests.yml
89
RUN mkdir $APP_HOME && adduser -S -D -H python
910

1011
RUN chown -R python $APP_HOME
12+
RUN chmod 777 $APP_HOME
1113
WORKDIR $APP_HOME
1214
ADD requirement*.txt $APP_HOME
1315
RUN pip install -r requirements-docker.txt

config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ ms:
66
SQLALCHEMY_TRACK_MODIFICATIONS: true
77
SECRET_KEY: "gjr39dkjn344_!67#"
88
DATABASE: db.sqlite3
9-
SQLALCHEMY_DATABASE_URI: sqlite:///db.sqlite3
9+
SQLALCHEMY_DATABASE_URI: sqlite:////microservice/db.sqlite3

requirements-docker.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
-r requirements.txt
22
gevent==1.3.7
33
gunicorn==19.9.0
4+
psutil==5.4.8

requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
Flask-SQLAlchemy==2.3.2
2-
py-ms==0.1.1
3-
SQLAlchemy==1.2.13
2+
# py-ms==0.1.1
3+
git+https://github.com/python-microservices/pyms.git@master#egg=py-ms
4+
Flask-Script==2.0.6
5+
connexion[swagger-ui]

tests/config-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ ms:
66
SQLALCHEMY_TRACK_MODIFICATIONS: true
77
SECRET_KEY: "gjr39dkjn344_!67#"
88
DATABASE: db_test.sqlite3
9-
SQLALCHEMY_DATABASE_URI: sqlite:///db_test.sqlite3
9+
SQLALCHEMY_DATABASE_URI: sqlite:////microservice/db_test.sqlite3

0 commit comments

Comments
 (0)