Docker-compose
Compose example
services:
mkdocs:
build:
context: .
dockerfile: Dockerfile
container_name: mkdocs
image: nome-immagine:tag
ports:
- "80:8000"
volumes:
- ./docs:/docs
- ./mkdocs.yml:/mkdocs.yml
networks:
- net_mkdocs
restart: unless-stopped
mem_limit: 512m
mem_reservation: 128M
memswap_limit: 1g
cpus: "0.5"
cpuset: "1"
depends_on:
- postgres
postgres:
image: postgres:15
container_name: postgres
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: mydb
ports:
- "5432:5432"
networks:
- net_mkdocs
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user"]
interval: 10s
timeout: 5s
retries: 5
networks:
net_mkdocs:
driver: bridge
volumes:
pgdata:
name: pgdata