Skip to content

Commit 97c0119

Browse files
committed
Changes in networking
1 parent 4845665 commit 97c0119

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "PostgreSQL and PG Admin",
55
"waitFor": "onCreateCommand",
66
"dockerComposeFile": "docker-compose.yml",
7-
"service": "db",
7+
"service": "postgresql",
88
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
99
// Features to add to the dev container. More info: https://containers.dev/features.
1010
// "features": {},
@@ -31,11 +31,11 @@
3131
}
3232
},
3333
"forwardPorts": [
34-
5432,
34+
// 5432,
3535
8080
3636
],
3737
// Use 'postCreateCommand' to run commands after the container is created.
38-
// "postCreateCommand": "yarn install",
38+
"postCreateCommand": "ls -al",
3939
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
4040
// "remoteUser": "vscode"
4141
}

.devcontainer/docker-compose.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.8'
22

33
services:
4-
db:
4+
postgresql:
55
image: postgres:latest
66
restart: unless-stopped
77
volumes:
@@ -10,17 +10,21 @@ services:
1010
POSTGRES_USER: postgres
1111
POSTGRES_DB: postgres
1212
POSTGRES_PASSWORD: postgres
13+
network_mode: service:pgadmin
14+
15+
# ports:
16+
# - "5432:5432"
1317
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
1418
# (Adding the "ports" property to this file will not forward from a Codespace.)
1519

1620
pgadmin:
17-
image: dpage/pgadmin4:6.10
21+
image: dpage/pgadmin4:8.3
1822
restart: unless-stopped
1923
volumes:
2024
- pgadmin-data:/var/lib/pgadmin
2125
environment:
22-
PGADMIN_DEFAULT_EMAIL: jonhdoe@gmail.com
23-
PGADMIN_DEFAULT_PASSWORD: StrongPassword
26+
PGADMIN_DEFAULT_EMAIL: sql@mongodb.com
27+
PGADMIN_DEFAULT_PASSWORD: password
2428
PGADMIN_LISTEN_PORT: 8080
2529
PGADMIN_CONFIG_PROXY_X_HOST_COUNT: 1
2630
PGADMIN_CONFIG_PROXY_X_PREFIX_COUNT: 1

0 commit comments

Comments
 (0)