This commit is contained in:
egyhaty 2023-12-04 07:42:15 +02:00
parent 650ec5cf09
commit e866157052
2 changed files with 32 additions and 3 deletions

View file

@ -1,5 +1,10 @@
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
View 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: