81 lines
No EOL
1.8 KiB
YAML
81 lines
No EOL
1.8 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: pleroma_db
|
|
restart: always
|
|
ports:
|
|
- "55432:5432"
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASS}
|
|
POSTGRES_DB: ${DB_NAME}
|
|
volumes:
|
|
- ./postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "${DB_USER}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
mem_limit: 512m
|
|
networks:
|
|
pleroma_net:
|
|
ipv4_address: 172.24.0.2
|
|
|
|
pleroma_backend:
|
|
build:
|
|
context: ./pleroma_backend
|
|
dockerfile: Dockerfile
|
|
container_name: pleroma_backend
|
|
restart: always
|
|
ports:
|
|
- "4000:4000"
|
|
environment:
|
|
DOMAIN: ${DOMAIN}
|
|
INSTANCE_NAME: ${INSTANCE_NAME}
|
|
ADMIN_EMAIL: ${ADMIN_EMAIL}
|
|
NOTIFY_EMAIL: ${NOTIFY_EMAIL}
|
|
DB_USER: ${DB_USER}
|
|
DB_PASS: ${DB_PASS}
|
|
DB_NAME: ${DB_NAME}
|
|
volumes:
|
|
- ./uploads:/var/lib/pleroma/uploads
|
|
- ./static:/var/lib/pleroma/static
|
|
- ./config:/etc/pleroma
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
command: ["/bin/sh", "-c", "mix ecto.migrate && ./bin/pleroma start"]
|
|
mem_limit: 1g
|
|
networks:
|
|
pleroma_net:
|
|
ipv4_address: 172.24.0.3
|
|
|
|
pleroma_frontend:
|
|
build:
|
|
context: ./pleroma_frontend
|
|
dockerfile: Dockerfile
|
|
container_name: pleroma_frontend
|
|
restart: always
|
|
volumes:
|
|
- ./pleroma_frontend_dist:/app/dist
|
|
mem_limit: 256m
|
|
networks:
|
|
pleroma_net:
|
|
ipv4_address: 172.24.0.4
|
|
|
|
networks:
|
|
pleroma_net:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.24.0.0/16
|
|
gateway: 172.24.0.1
|
|
|
|
volumes:
|
|
postgres_data:
|
|
pleroma_frontend_dist:
|
|
uploads:
|
|
static:
|
|
config: |