version: "3" services: database: container_name: postgres image: postgres:13 environment: - POSTGRES_USER=codimd - POSTGRES_PASSWORD=change_password - POSTGRES_DB=codimd volumes: - ./data/postgres:/var/lib/postgresql/data restart: unless-stopped networks: nginx: aliases: - postgres codimd: container_name: hackmd image: hackmdio/hackmd:2.4.1 environment: - CMD_DB_URL=postgres://codimd:change_password@postgres/codimd - CMD_USECDN=false depends_on: - database ports: - "3000:3000" volumes: - ./data/hackmd:/home/hackmd/app/public/uploads restart: unless-stopped networks: nginx: aliases: - hackmd networks: nginx: external: true