Skip to content

Instantly share code, notes, and snippets.

@ezesundayeze
Created June 27, 2020 05:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezesundayeze/090ac72194d3200afba3384e151623ce to your computer and use it in GitHub Desktop.
Save ezesundayeze/090ac72194d3200afba3384e151623ce to your computer and use it in GitHub Desktop.
#!/bin/bash
FROM python:3.7
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN mkdir /usr/src/app/
VOLUME /usr/src/app/
WORKDIR /usr/src/app/
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app/
COPY ./entrypoint.prod.sh /usr/src/app/entrypoint.prod.sh
# run entrypoint.prod.sh
ENTRYPOINT ["/usr/src/app/entrypoint.prod.sh"]
@ezesundayeze
Copy link
Author

docker-compose.yaml

version: '3.7'
services:
web:
build: ./
command: 'gunicorn internplug.wsgi:application --bind 0.0.0.0:8000'
container_name: internplug
volumes:
- './:/usr/src/app/'
ports:
- '8000:8000'
env_file:
- ./.env.prod.db
depends_on:
- db
db:
image: 'postgres'
container_name: internplug_db
volumes:
- 'postgres_data:/var/lib/postgresql/data/'
env_file:
- ./.env.prod.db
volumes:
postgres_data: null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment