Push app
This commit is contained in:
parent
650ec5cf09
commit
e866157052
2 changed files with 32 additions and 3 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -1,5 +1,10 @@
|
||||||
FROM python:latest
|
FROM python:latest
|
||||||
COPY . .
|
|
||||||
CMD python3 -m pip install -r requirements/docs.txt
|
|
||||||
RUN python3 -m flask run
|
|
||||||
|
|
||||||
|
WORKDIR /src/flask
|
||||||
|
|
||||||
|
COPY ./examples/tutorial /src/flask
|
||||||
|
|
||||||
|
RUN pip install -e .
|
||||||
|
RUN pip install --upgrade pip
|
||||||
|
RUN flask --app flaskr init-db
|
||||||
|
CMD flask --app flaskr run --debug --host 0.0.0.0
|
||||||
|
|
|
||||||
24
docker-compose.yml
Normal file
24
docker-compose.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysqldb:
|
||||||
|
image: mysql:8.0
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: ./.env
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
volumes:
|
||||||
|
- db:/var/lib/mysql
|
||||||
|
app:
|
||||||
|
depends_on:
|
||||||
|
- mysqldb
|
||||||
|
build: ./
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file: ./.env
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db:
|
||||||
Loading…
Add table
Add a link
Reference in a new issue