Skip to content

Commit

Permalink
dockerize the env with a dev container
Browse files Browse the repository at this point in the history
  • Loading branch information
jifalops committed Feb 26, 2024
1 parent 0d74f3c commit e95eb59
Show file tree
Hide file tree
Showing 4 changed files with 46 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/rust:bookworm
17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Cypher DTO",
"dockerComposeFile": "./docker-compose.yml",
"service": "app",
"workspaceFolder": "/cypher-dto",
"postCreateCommand": "sudo chown -R vscode:vscode /cypher-dto",
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer",
"JScearcy.rust-doc-viewer",
"tamasfe.even-better-toml",
"vadimcn.vscode-lldb"
]
}
}
}
27 changes: 27 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: "3.8"

services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
depends_on:
- db
command: sleep infinity
volumes:
- ..:/cypher-dto:cached

db:
image: neo4j:5
ports:
- "7474:7474"
- "7687:7687"
volumes:
- db_data:/data
- db_logs:/logs
environment:
NEO4J_AUTH: neo4j/developer

volumes:
db_data:
db_logs:
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/

0 comments on commit e95eb59

Please sign in to comment.