Docker Compose
database compose
version: "3.5"
services:
postgres:
image: postgres:14-alpine
command: postgres -c 'max_connections='
container_name:
hostname:
# networks:
# defuat:
# ipv4_address: 10.34.0.30
ports:
- "5432:5432"
volumes:
- type: bind
source: ./data
target: /var/lib/postgresql/data
environment:
POSTGRES_DB:
POSTGRES_USER:
POSTGRES_PASSWORD:
cpus: 1.0
mem_limit: 2048m
memswap_limit: 2048m
restart: unless-stopped
backend compose
version: '3.8'
services:
backend:
image:
ports:
- "8080:8080"
environment:
DATABASE_URL: ${DATABASE_URL}
MODE: ${MODE}
DOMAIN: ${DOMAIN}
JWT_SECRET: ${JWT_SECRET}
volumes:
- .env:/app/.env
frontend compose
version: '3.8'
services:
frontend:
image:
ports:
- "80:80"
No Comments