add postgres

This commit is contained in:
2023-06-26 10:00:14 +08:00
parent d448f1255e
commit 45e4d131c5

View File

@@ -0,0 +1,23 @@
version: "3"
services:
postgres:
container_name: postgres
image: postgres:14.2
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
# - POSTGRES_DB=database
volumes:
- ./postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
networks:
nginx:
aliases:
- postgres
networks:
nginx:
external: true