-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #465 from MongoEngine/example-app-new
Duplicate example application removed + Allowed to run with docker
- Loading branch information
Showing
18 changed files
with
62 additions
and
142 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,25 @@ | ||
version: "3.3" | ||
volumes: | ||
db_data: {} | ||
|
||
services: | ||
mongo: | ||
image: mongo:4.4 | ||
volumes: | ||
- db_data:/data/db/ | ||
ports: | ||
- 27017:27017 | ||
restart: always | ||
|
||
flask: | ||
build: | ||
context: . | ||
dockerfile: ./example_app/compose/flask/Dockerfile | ||
depends_on: | ||
- mongo | ||
command: python ./example_app/app.py | ||
ports: | ||
- 8000:8000 | ||
volumes: | ||
- ./:/flask_mongoengine | ||
restart: always |
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,18 @@ | ||
# Example app | ||
|
||
A simple multi file app - to help get you started. | ||
|
||
Completely located in docker container. Require ports 8000, 27015 on host | ||
system to be opened (for development needs). | ||
|
||
Usage: | ||
|
||
1. From flask-mongoengine root folder just run `docker-compose up`. | ||
2. Wait until dependencies downloaded and containers up and running. | ||
3. Open `http://localhost:8000/` to check the app. | ||
4. Hit `ctrl+c` in terminal window to stop docker-compose. | ||
5. You can use this app for live flask-mongoengine development and testing. | ||
|
||
```{note} | ||
Example app files located in ``example_app`` directory. | ||
``` |
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
File renamed without changes.
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
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,9 @@ | ||
FROM python:3.7-slim as dev | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
RUN groupadd -r flask && useradd -r -g flask flask | ||
COPY --chown=flask . /flask_mongoengine | ||
RUN pip install --upgrade pip \ | ||
&& pip install -r /flask_mongoengine/requirements.txt \ | ||
&& pip install -e /flask_mongoengine | ||
WORKDIR /flask_mongoengine |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.