Docker
Using docker for deployment
DockerFile
Dockerfile
# syntax=docker/dockerfile:1
# Base Configurations
FROM python:3.10-alpine
# Copy Data to "project/"
WORKDIR /project
COPY . .
# Scripts: Before Starting
# RUN apk add curl
RUN python3 -m pip install -r requirements.txt
# Run App
ENTRYPOINT ["python3"]
CMD ["manage.py", "run", "--port", "8080", "--workers", "1"]
Create Image
Run Image
Docker Compose
docker-compose.yaml
networks:
# Network(s)
shared:
driver: bridge
services:
# App | Container
app:
container_name: fastberry_app
ports:
- "8080:8080"
volumes:
- ./data:/data
build:
context: .
# restart: always