forked from eazytrainingfr/student-list
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dockerfile and docker-compose files
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM python:2.7-stretch | ||
|
||
LABEL maintainer="DIALLO Mafouz <mafouzdiallo@gmail.com>" | ||
|
||
ADD . / | ||
|
||
RUN apt-get update -y && apt-get install python-dev python3-dev \ | ||
libsasl2-dev python-dev libldap2-dev libssl-dev python-pip -y \ | ||
&& pip install flask flask_httpauth flask_simpleldap python-dotenv | ||
|
||
RUN mkdir /data | ||
|
||
VOLUME /data | ||
|
||
EXPOSE 5000 | ||
|
||
CMD [ "python", "./student_age.py" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: '3' | ||
services: | ||
website: | ||
image: php:apache | ||
environment: | ||
USERNAME : "toto" | ||
PASSWORD : "python" | ||
volumes: | ||
- "./website:/var/www/html" | ||
depends_on: | ||
- API | ||
ports: | ||
- 8090:80 | ||
API: | ||
image: student_list_api | ||
volumes: | ||
- ./simple_api/student_age.json:/data/student_age.json | ||
ports: | ||
- 5000:5000 |