Skip to content

Commit

Permalink
chore: add devcontainer config
Browse files Browse the repository at this point in the history
  • Loading branch information
silenaker committed Jul 16, 2024
1 parent 4024935 commit 5a307fd
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
}
45 changes: 45 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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: "[email protected]"
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:

0 comments on commit 5a307fd

Please sign in to comment.