node-postgres/.devcontainer/docker-compose.yml
Nigro Simone b5281f5b0a
fix devcontainer (#3251)
* fix devcontainer

* fix scam autentication required

* fix connection

* install pg native lib

* fix: host

* Update devcontainer.json

* Update docker-compose.yml

* Update index.js
2024-06-24 15:16:15 -05:00

53 lines
1.7 KiB
YAML

#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
version: '3.9'
services:
web:
# Uncomment the next line to use a non-root user for all processes. You can also
# simply use the "remoteUser" property in devcontainer.json if you just want VS Code
# and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
# you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
# user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
# user: node
build:
context: .
dockerfile: Dockerfile
volumes:
- ..:/workspace:cached
environment:
PGPASSWORD: pass
PGUSER: user
PGDATABASE: data
PGHOST: db
# set this to true in the development environment until I can get SSL setup on the
# docker postgres instance
PGTESTNOSSL: 'true'
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
depends_on:
- db
links:
- db:db
db:
image: postgres:14-alpine
restart: unless-stopped
ports:
- 5432:5432
command: postgres -c password_encryption=md5
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_INITDB_ARGS: "--auth-local=md5"
POSTGRES_PASSWORD: pass
POSTGRES_USER: user
POSTGRES_DB: data