From 0fa39214bbd2c186dd975e6d2c7731ab3f0fa8e1 Mon Sep 17 00:00:00 2001 From: Adolfo Delorenzo Date: Sat, 19 Jul 2025 17:35:37 +0000 Subject: [PATCH] Replace nginx with PostgreSQL in root compose file --- docker-compose.yml | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e1240aa..be26fec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,22 +1,30 @@ services: - nginx: - image: nginx:alpine - container_name: nginx-webserver - ports: - - "6767:80" - volumes: - - ./html:/usr/share/nginx/html:ro + postgres: + image: postgres:16 restart: unless-stopped environment: - - NGINX_HOST=localhost - - NGINX_PORT=80 - networks: - - nginx-network + POSTGRES_USER: postgres + POSTGRES_PASSWORD: your_secure_password_here + POSTGRES_DB: myapp + PGDATA: /var/lib/postgresql/data/pgdata + volumes: + - postgres_data:/var/lib/postgresql/data + ports: + - "5432:5432" -networks: - nginx-network: - driver: bridge + pgadmin: + image: dpage/pgadmin4:latest + 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: - nginx-data: - driver: local \ No newline at end of file + postgres_data: + pgadmin_data: