diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000000..181b7380d1666 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1 @@ +FROM mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000..34622aaa93e4b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,19 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node +{ + "name": "Medusa", + "dockerComposeFile": "docker-compose.yml", + "service": "app", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "mounts": [ + "source=${localEnv:HOME}/.ssh,target=/root/.ssh,type=bind,consistency=cached" + ], + "features": { + "ghcr.io/jckimble/devcontainer-features/ngrok:3": {} + }, + "forwardPorts": [ + 80, + 5540 + ], + "remoteUser": "root" +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000000000..4c8a45cd4dfd7 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,45 @@ +version: "3.8" + +services: + app: + build: + context: . + dockerfile: Dockerfile + volumes: + - ../..:/workspaces:cached + environment: + DB_HOST: localhost + DB_USERNAME: postgres + DB_PASSWORD: postgres + command: sleep infinity + + db: + image: postgres + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + network_mode: service:app + + pgadmin: + image: dpage/pgadmin4 + environment: + PGADMIN_DEFAULT_EMAIL: "admin@domain.com" + PGADMIN_DEFAULT_PASSWORD: "admin" + network_mode: service:app + + redis: + image: redis + volumes: + - redis_data:/data + command: redis-server --appendonly yes + network_mode: service:app + + redisinsight: + image: "redislabs/redisinsight" + network_mode: service:app + +volumes: + postgres-data: + redis_data: