Created
December 29, 2020 16:22
-
-
Save vijaysharmay/9a8dcb7780246180424b1d7dec97b272 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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