// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
	"name": "Komodo",
	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
	//"image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye",
	"dockerComposeFile": ["dev.compose.yaml"],
	"workspaceFolder": "/workspace",
  	"service": "dev",
	// Features to add to the dev container. More info: https://containers.dev/features.
	"features": {
		"ghcr.io/devcontainers/features/node:1": {
			"version": "22.12.0" 
		},
		"ghcr.io/devcontainers-community/features/deno:1": {

		}
	},

	// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
	"mounts": [
		{
			"source": "devcontainer-cargo-cache-${devcontainerId}",
			"target": "/usr/local/cargo",
			"type": "volume"
		}
	],

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	"forwardPorts": [
		5173,
		9120
	],

	// Use 'postCreateCommand' to run commands after the container is created.
	"postCreateCommand": "./.devcontainer/postCreate.sh",

	"runServices": [
		"db"
	],

	// Configure tool-specific properties.
	// "customizations": {},

	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
	// "remoteUser": "root"
	
	 "remoteEnv": {
		// Avoid out of memory error when running `yarn build`
		"NODE_OPTIONS": "--max-old-space-size=4096"
	}
}
