adding db env variables

This commit is contained in:
Jun-te Kim 2025-03-26 14:18:07 +00:00
parent 4689a66079
commit 060e898894
3 changed files with 55 additions and 1 deletions

6
.db-env Normal file
View file

@ -0,0 +1,6 @@
POSTGRES_USER=postgres
POSTGRES_PASSWORD=makingwarmhomes
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
PGADMIN_DEFAULT_EMAIL=junte@domna.homes
PGADMIN_DEFAULT_PASSWORD=makingwarmhomes

View file

@ -1,6 +1,7 @@
{
"name": "Basic Python",
"build": { "dockerfile": "Dockerfile" },
"dockerComposeFile": "docker-compose.yml",
"service": "survey-extractor",
"remoteUser": "vscode",
"postStartCommand": "bash .devcontainer/post-install.sh",
"mounts": [

View file

@ -0,0 +1,47 @@
version: '3.8'
services:
survey-extractor:
user: "${UID}:${GID}"
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspaces:cached
command: sleep infinity
depends_on:
- db
networks:
- default
db:
image: postgres:latest
restart: unless-stopped
ports:
- 5432:5432
env_file:
# double check this
- ../.db-env
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- default
pgadmin:
image: dpage/pgadmin4
hostname: pgadmin
ports:
- 5555:80
env_file:
- ../.db-env
restart: unless-stopped
networks:
- default
depends_on:
- db
volumes:
postgres-data:
networks:
default: