Skip to content

Commit

Permalink
Patch the excution under Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
app-generator committed Nov 14, 2019
1 parent 6162fa4 commit ed34dd1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -2,11 +2,11 @@ FROM python:3.6

ENV FLASK_APP run.py

COPY run.py gunicorn.py requirements.txt config.py .env ./
COPY run.py gunicorn.py requirements-sqlite.txt config.py .env ./
COPY app app
COPY migrations migrations

RUN pip install -r requirements.txt
RUN pip install -r requirements-sqlite.txt

EXPOSE 5000
CMD ["gunicorn", "--config", "gunicorn.py", "run:app"]
21 changes: 21 additions & 0 deletions README.md
Expand Up @@ -53,6 +53,27 @@ $ # 5. Go to http://127.0.0.1:5000/, create an account and log in

<br />

## Docker execution

The application can be easily excuted in a docker container. The steps:

> Get the code
```bash
$ git clone https://github.com/app-generator/flask-boilerplate-dashboard-argon.git
$ cd flask-boilerplate-dashboard-argon
```

> Start the app in Docker
```bash
$ sudo docker-compose pull && sudo docker-compose build && sudo docker-compose up -d
```

Visit `http://localhost:5000` in your browser. The app should be up & running.

<br />

## Want more? Go PRO!

<br />
Expand Down
10 changes: 0 additions & 10 deletions docker-compose.yml
@@ -1,13 +1,5 @@
version: '3'
services:
db:
restart: always
image: postgres:10
env_file: .env
expose:
- 5432
networks:
- db_network
appseed-app:
restart: always
env_file: .env
Expand All @@ -17,8 +9,6 @@ services:
networks:
- db_network
- web_network
depends_on:
- db
nginx:
restart: always
image: "nginx:latest"
Expand Down

0 comments on commit ed34dd1

Please sign in to comment.