mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
45 lines
1.4 KiB
YAML
45 lines
1.4 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'
|
|
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
|
|
|
|
# Overrides default command so things don't shut down after the process ends.
|
|
command: sleep infinity
|
|
|
|
links:
|
|
- db
|
|
|
|
db:
|
|
image: postgres
|
|
restart: unless-stopped
|
|
ports:
|
|
- 5432:5432
|
|
environment:
|
|
POSTGRES_PASSWORD: pass
|
|
POSTGRES_USER: user
|
|
POSTGRES_DB: data
|
|
|