Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Dockerfile to application #152

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM python:alpine3.7

# #Installing requirements for Pillow
RUN apk --update add libxml2-dev libxslt-dev libffi-dev gcc musl-dev libgcc openssl-dev curl
RUN apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev

WORKDIR /app

COPY requirements.txt /app
RUN pip install -r requirements.txt

COPY . /app

WORKDIR /app/traveller

RUN mkdir instance
RUN touch instance/config.py

RUN python manage.py initialise
RUN python manage.py db migrate
RUN python manage.py db upgrade

CMD ["python", "manage.py", "rundebug"]
47 changes: 47 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: '3.8'

services:
mysqldb:
image: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: db_name
MYSQL_USER: username
ports:
- 3306:3306
volumes:
- db:/var/lib/mysql
adminer:
image: adminer
restart: always
ports:
- 8080:8080
maildev:
image: maildev/maildev
ports:
- 1080:1080
- 1025:1025
environment:
MAILDEV_WEB_USER: admin
MAILDEV_WEB_PASS: password
MAILDEV_INCOMING_USER: ''
MAILDEV_INCOMING_PASS: ''
MAILDEV_WEB_PORT: 1080
MAILDEV_SMTP_PORT: 1025
volumes:
- mail-maildev-data:/var/lib/maildev
app:
depends_on:
- mysqldb
- maildev
build: ./
restart: unless-stopped
ports:
- 5000:5000
stdin_open: true
tty: true

volumes:
db:
mail-maildev-data: