This commit is contained in:
DarkCat09 2023-02-16 18:54:45 +04:00
parent b6c138b452
commit 13f10ab255
4 changed files with 25 additions and 2 deletions

4
.env
View file

@ -1,5 +1,5 @@
MYSQL_HOST=localhost
MYSQL_HOST=${REPO_NAME_SNAKE}_db
MUSQL_PORT=3306
MYSQL_USER=darkcat09
MYSQL_USER=${REPO_NAME_SNAKE}
MYSQL_PASSWORD=
MYSQL_DATABASE=${REPO_NAME_SNAKE}

View file

@ -3,3 +3,4 @@ flaskapp/db.py
db/schema.sql
templates/base.html
.env
docker-compose.yml

5
Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM python:3-alpine
RUN apk update && apk upgrade && apk add python3-pip
COPY . .
RUN pip install -r requirements.txt
CMD make prod

17
docker-compose.yml Normal file
View file

@ -0,0 +1,17 @@
version: "3"
services:
${REPO_NAME_SNAKE}:
image: ${REPO_NAME_SNAKE}:latest
container_name: ${REPO_NAME_SNAKE}
restart: unless-stopped
ports:
- "8080:8000"
links:
- ${REPO_NAME_SNAKE}_db
env_file: .env
${REPO_NAME_SNAKE}_db:
image: mariadb:latest
container_name: ${REPO_NAME_SNAKE}_db
restart: unless-stopped
env_file: .env