Skip to content

Instantly share code, notes, and snippets.

@vijaysharmay
Created December 29, 2020 16:22
Show Gist options
  • Select an option

  • Save vijaysharmay/9a8dcb7780246180424b1d7dec97b272 to your computer and use it in GitHub Desktop.

Select an option

Save vijaysharmay/9a8dcb7780246180424b1d7dec97b272 to your computer and use it in GitHub Desktop.
version: '3.4'
services:
kootie:
container_name: dummy_app
build:
context: ./
dockerfile: Dockerfile
ports:
- 8080:8000
depends_on:
- cheetu
# command: ["./wait-for-mysql.sh", "gunicorn", "dummy.wsgi", "--bind=0.0.0.0:8000"]
cheetu:
container_name: dummy_db
image: mysql:5.7
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: shivank
MYSQL_DATABASE: dummy_db
FROM python:3.7-alpine
RUN apk add gcc libc-dev linux-headers mariadb-dev
RUN pip install django gunicorn mysqlclient
COPY dummy /app/dummy
COPY stupid /app/stupid
COPY manage.py /app
COPY wait-for-mysql.sh /app
WORKDIR /app
EXPOSE 8000
CMD ["./wait-for-mysql.sh", "gunicorn", "dummy.wsgi", "--bind=0.0.0.0:8000"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment