mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-09-18 05:29:37 +08:00
25 lines
524 B
YAML
25 lines
524 B
YAML
services:
|
|
# API
|
|
django:
|
|
env_file: .env
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: git.06222001.xyz/keannu125/drf_template:latest
|
|
restart: always
|
|
ports:
|
|
- "${BACKEND_PORT}:8000"
|
|
environment:
|
|
- RUN_TYPE=api
|
|
volumes:
|
|
- ./src/static:/app/src/static # Bind mount for persistent static files
|
|
depends_on:
|
|
- redis
|
|
|
|
# Cache
|
|
redis:
|
|
env_file: .env
|
|
image: redis:latest
|
|
restart: always
|
|
environment:
|
|
- REDIS_PASSWORD=${CACHE_PASSWORD}
|