-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
30 lines (25 loc) · 691 Bytes
/
setup.bat
File metadata and controls
30 lines (25 loc) · 691 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@echo off
REM Stop containers if they are running
docker-compose down postgres pgadmin
REM Create necessary directories
mkdir postgres\data 2>nul
REM Create pgAdmin configuration file
(
echo {
echo "Servers": {
echo "1": {
echo "Name": "PostgreSQL Local",
echo "Group": "Servers",
echo "Host": "postgres",
echo "Port": 5432,
echo "MaintenanceDB": "postgres",
echo "Username": "postgres",
echo "PassFile": "/pgpass",
echo "SSLMode": "prefer"
echo }
echo }
echo }
) > postgres\servers.json
REM Create pgAdmin password file
echo postgres:5432:*:postgres:postgres > postgres\pgpass
echo Directories and files created successfully!