-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ff62f6
commit e2ca121
Showing
6 changed files
with
58 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version: '3.4' | ||
|
||
services: | ||
database: | ||
image: postgres:14-alpine | ||
restart: always | ||
environment: | ||
POSTGRES_PASSWORD: postgrePassword | ||
POSTGRES_DB: cgigeiotdemo | ||
volumes: | ||
- pgdata:/var/lib/postgresql/data | ||
healthcheck: | ||
test: ["CMD-SHELL", "sh -c 'pg_isready -U postgres -d cgigeiotdemo'"] | ||
interval: 10s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
# [Optional] You can use build args to set options. e.g. 'VARIANT' below affects the image in the Dockerfile | ||
args: | ||
NODE_VERSION: lts/* | ||
|
||
volumes: | ||
# This is where VS Code should expect to find your project's source code and the value of "workspaceFolder" in .devcontainer/devcontainer.json | ||
- ..:/workspace:cached | ||
|
||
# Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker-compose for details. | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
# Overrides default command so things don't shut down after the process ends. | ||
command: /bin/sh -c "while sleep 1000; do :; done" | ||
|
||
depends_on: | ||
database: | ||
condition: service_healthy | ||
volumes: | ||
pgdata: |
This file contains 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
This file contains 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
This file contains 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