updates database design for mariadb

This commit is contained in:
2020-05-27 20:06:43 +02:00
parent 0cfc801f59
commit 355ba99ca3
18 changed files with 435 additions and 139 deletions

Binary file not shown.

View File

@ -1,13 +1,11 @@
FROM python:3.8-slim-buster
RUN apt-get update && apt-get upgrade
RUN apt-get install -y cron
RUN pip3 install flask Flask-SQLAlchemy flask_migrate flask_login flask_wtf python-dotenv
RUN apt-get install gcc libpcre3 libpcre3-dev -y
RUN apt-get install gcc libpcre3 libpcre3-dev libmariadbclient-dev -y
RUN pip3 install uwsgi
RUN pip3 install email-validator
RUN pip3 install google google-oauth google-auth-oauthlib google-api-python-client
RUN pip3 install google google-oauth google-auth-oauthlib google-api-python-client mysqlclient
COPY docker-entrypoint.sh /usr/local/bin/
EXPOSE 8084
EXPOSE 3001
ENTRYPOINT ["docker-entrypoint.sh"]

View File

@ -1,7 +1,7 @@
#!/bin/sh
cd /home/calendarwatch
# uwsgi --http-socket 0.0.0.0:8084 -w wsgi --protocol=https
export FLASK_APP=/home/calendarwatch/server.py
python3 server.py
echo "server has been started"

View File

@ -1,11 +1,29 @@
version: '3'
services:
calendarwatch:
build:
context: ./calendarwatch
image: calendarwatch:latest
container_name: calendarwatch
volumes:
- ../:/home/calendarwatch
ports:
- "0.0.0.0:8084:8084"
calendarwatch:
build:
context: ./calendarwatch
image: calendarwatch:latest
container_name: calendarwatch
environment:
- FLASK_APP=/home/calendarwatch/server.py
volumes:
- ../:/home/calendarwatch
ports:
- "0.0.0.0:8084:8084"
mariadb:
image: mariadb
container_name: maridab
environment:
- MYSQL_ROOT_PASSWORD=pw
- MYSQL_DATABASE=calendarwatch
- MYSQL_USER=user
- MYSQL_PASSWORD=pw
volumes:
- database:/var/lib/mysql
volumes:
database:
driver: local