Files
Chat/docker-compose.yml

43 lines
875 B
YAML

version: "3.5"
services:
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pass2postgres
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
- ./create_database.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
networks:
- postgres
restart: unless-stopped
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: admin@mail.com
PGADMIN_DEFAULT_PASSWORD: pass2admin
PGADMIN_LISTEN_PORT: 80
PGADMIN_CONFIG_SERVER_MODE: "False"
volumes:
- pgadmin:/var/lib/pgadmin
ports:
- "5050:80"
networks:
- postgres
restart: unless-stopped
networks:
postgres:
driver: bridge
volumes:
postgres:
pgadmin: