Skip to content

Commit

Permalink
install dotfiles after the devcontainer is created
Browse files Browse the repository at this point in the history
  • Loading branch information
jifalops committed Feb 26, 2024
1 parent e95eb59 commit 0035d7d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 0 additions & 1 deletion .devcontainer/Dockerfile

This file was deleted.

8 changes: 5 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
"dockerComposeFile": "./docker-compose.yml",
"service": "app",
"workspaceFolder": "/cypher-dto",
"postCreateCommand": "sudo chown -R vscode:vscode /cypher-dto",
"postCreateCommand": ".devcontainer/post-create.sh",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer",
"JScearcy.rust-doc-viewer",
"tamasfe.even-better-toml",
"vadimcn.vscode-lldb"
"tamasfe.even-better-toml"
]
}
}
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
image: mcr.microsoft.com/devcontainers/rust:bookworm
depends_on:
- db
command: sleep infinity
volumes:
- ..:/cypher-dto:cached
environment:
GITHUB_TOKEN: ${GITHUB_TOKEN}

db:
image: neo4j:5
Expand Down
8 changes: 8 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ensure devcontainer user owns the project directory
sudo chown -R vscode:vscode /cypher-dto

# Remember history on the local machine
ln -s /cypher-dto/.devcontainer/.bash_history ~/.bash_history

# Install dotfiles
gh repo clone dotfiles ~/dotfiles && ~/dotfiles/install.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target/
.bash_history

0 comments on commit 0035d7d

Please sign in to comment.