Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pymongo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
docker101
pymongo
Commits
f7436bb7
Commit
f7436bb7
authored
Sep 02, 2019
by
Ahmad Anvari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dockerize app
parent
c8644f53
Pipeline
#888
failed with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
Dockerfile
Dockerfile
+20
-0
app.py
app.py
+1
-1
docker-compose.yml
docker-compose.yml
+13
-0
No files found.
Dockerfile
0 → 100644
View file @
f7436bb7
# Use an official Python runtime as a parent image
FROM
python:3.6
# Set the working directory to /app
WORKDIR
/app
# Copy the current directory contents into the container at /app
COPY
. /app
# Install any needed packages specified in requirements.txt
RUN
pip
install
-r
requirements.txt
# Make port 80 available to the world outside this container
EXPOSE
80
# Define environment variable
ENV
NAME World
# Run app.py when the container launches
CMD
["python", "app.py"]
app.py
View file @
f7436bb7
...
@@ -2,4 +2,4 @@ from app import app
...
@@ -2,4 +2,4 @@ from app import app
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
app
.
run
()
app
.
run
(
host
=
"0.0.0.0"
,
port
=
80
)
docker-compose.yml
0 → 100644
View file @
f7436bb7
version
:
'
3'
services
:
app
:
build
:
.
ports
:
-
80:80
environment
:
-
MONGO_HOST=mongo
-
MONGO_PORT=27017
mongo
:
image
:
mongo:4.2.0
volumes
:
-
/var/lib/mongodb/data:/data/db
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment