diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2021-09-17 21:35:11 +0000 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2021-09-17 21:35:11 +0000 |
| commit | 3edc57fa22ad378826c1ed35f2cb0e6d657a20d4 (patch) | |
| tree | 49080bb4f0fc70bf112d0fb70df7ab9f0e4600f5 /.devcontainer/docker-compose.yml | |
| parent | 424a95e0ac4a43b53cf4660a5785b5d1115cc3a6 (diff) | |
| download | ao-coverage-3edc57fa22ad378826c1ed35f2cb0e6d657a20d4.tar.gz ao-coverage-3edc57fa22ad378826c1ed35f2cb0e6d657a20d4.tar.bz2 ao-coverage-3edc57fa22ad378826c1ed35f2cb0e6d657a20d4.zip | |
Add devcontainer files
Diffstat (limited to '.devcontainer/docker-compose.yml')
| -rw-r--r-- | .devcontainer/docker-compose.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..3b17947 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,46 @@ +version: '3' + +services: + app: + build: + context: . + dockerfile: Dockerfile + args: + # [Choice] Node.js version: 16, 14, 12 + VARIANT: 14 + # On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000. + USER_UID: 1000 + USER_GID: 1000 + + volumes: + - ..:/workspace: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: node + + # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + + db: + image: mongo:latest + restart: unless-stopped + volumes: + - mongodb-data:/data/db + + # Uncomment to change startup options + # environment: + # MONGO_INITDB_ROOT_USERNAME: root + # MONGO_INITDB_ROOT_PASSWORD: example + # MONGO_INITDB_DATABASE: your-database-here + + # Add "forwardPorts": ["27017"] to **devcontainer.json** to forward MongoDB locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + +volumes: + mongodb-data:
\ No newline at end of file |
