Skip to content

Commit

Permalink
Added devcontainer and initial docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreniche committed Feb 27, 2024
1 parent 70623d8 commit f943136
Show file tree
Hide file tree
Showing 74 changed files with 190,504 additions and 55 deletions.
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node-mongo
{
"name": "PostgreSQL and PG Admin",
"waitFor": "onCreateCommand",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"mongodb.mongodb-vscode"
]
}
},
"features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"portsAttributes": {
"5432": {
"label": "Posgres"
},
"8080": {
"label": "PGAdmin"
}
},
"forwardPorts": [
5432,
8080
]
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
29 changes: 29 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: "3.9"
services:
postgresql:
image: postgres:14
environment:
# - POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=library
ports:
- "5432:5432"
healthcheck: # we use this in pgadmin to wait for PostgreSQL to start
test: su -c 'pg_isready' postgres
interval: 10s
timeout: 3s
retries: 3
start_period: 2s
# web interface to admin Postgres
pgadmin:
image: dpage/pgadmin4:latest
ports:
- 8080:80
depends_on:
postgresql:
condition: service_healthy
environment: # add connection to postgresql
- [email protected]
- PGADMIN_DEFAULT_PASSWORD=password
volumes:
- ./pgadmin:/var/lib/pgadmin
6,251 changes: 6,251 additions & 0 deletions .devcontainer/pgadmin/library/library exports/a.csv

Large diffs are not rendered by default.

Loading

0 comments on commit f943136

Please sign in to comment.