Replace nginx with PostgreSQL in root compose file

This commit is contained in:
Adolfo Delorenzo 2025-07-19 17:35:37 +00:00
parent 31490b5004
commit 0fa39214bb

View File

@ -1,22 +1,30 @@
services: services:
nginx: postgres:
image: nginx:alpine image: postgres:16
container_name: nginx-webserver
ports:
- "6767:80"
volumes:
- ./html:/usr/share/nginx/html:ro
restart: unless-stopped restart: unless-stopped
environment: environment:
- NGINX_HOST=localhost POSTGRES_USER: postgres
- NGINX_PORT=80 POSTGRES_PASSWORD: your_secure_password_here
networks: POSTGRES_DB: myapp
- nginx-network PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks: pgadmin:
nginx-network: image: dpage/pgadmin4:latest
driver: bridge restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@example.com
PGADMIN_DEFAULT_PASSWORD: admin_password_here
volumes:
- pgadmin_data:/var/lib/pgadmin
ports:
- "8080:80"
depends_on:
- postgres
volumes: volumes:
nginx-data: postgres_data:
driver: local pgadmin_data: