54 lines
927 B
YAML
54 lines
927 B
YAML
version: "3.9"
|
|
x-common:
|
|
website:
|
|
&website
|
|
DJANGO_SETTINGS_MODULE: django_project.settings
|
|
SECRET_KEY: "${openssl rand -base64 64}"
|
|
FTP_URL: 0.0.0.0:21
|
|
postgres:
|
|
&postgres
|
|
POSTGRES_NAME: website
|
|
POSTGRESQL_USER: root
|
|
POSTGRES_PASSWORD: "${openssl rand -base64 64}"
|
|
POSTGRES_HOST: postgres
|
|
POSTGRES_PORT: 5432
|
|
redis:
|
|
&redis
|
|
REDIS_URL: redis:6379
|
|
|
|
services:
|
|
website:
|
|
environment:
|
|
<<: *website
|
|
<<: *postgres
|
|
<<: *redis
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8000:80"
|
|
working_dir: /app
|
|
entrypoint: /app/entrypoint.sh
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
networks:
|
|
- website
|
|
|
|
redis:
|
|
image: redis
|
|
environment:
|
|
<<: *redis
|
|
networks:
|
|
- website
|
|
|
|
postgres:
|
|
image: postgres
|
|
environment:
|
|
<<: *postgres
|
|
networks:
|
|
- website
|
|
|
|
networks:
|
|
website:
|