Replace nginx with PostgreSQL in root compose file
This commit is contained in:
parent
31490b5004
commit
0fa39214bb
@ -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
|
||||
postgres_data:
|
||||
pgadmin_data:
|
||||
|
Loading…
Reference in New Issue
Block a user