Created
December 5, 2021 14:30
-
-
Save agusrichard/2be234fe6c004f891b2fe22de7370bb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
app: | |
build: | |
context: .. | |
dockerfile: .devcontainer/Dockerfile | |
args: | |
# Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.17 | |
# Append -bullseye or -buster to pin to an OS version. | |
# Use -bullseye variants on local arm64/Apple Silicon. | |
VARIANT: 1 | |
# Optional Node.js version to install | |
NODE_VERSION: "none" | |
volumes: | |
- ..:/workspace/containerized-dev:cached | |
# Overrides default command so things don't shut down after the process ends. | |
command: sleep infinity | |
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. | |
network_mode: service:db | |
# Uncomment the next line to use a non-root user for all processes. | |
# user: vscode | |
db: | |
image: postgres:latest | |
restart: unless-stopped | |
volumes: | |
- postgres-data:/var/lib/postgresql/data | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_DB: containerized_dev | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 3000:5432 | |
volumes: | |
postgres-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment