diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 77d9f81..9e2192b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ FROM mcr.microsoft.com/devcontainers/python:3.12 -# Install PostgreSQL client and Zsh +# Install PostgreSQL client and zsh RUN apt-get update && apt-get install -y \ postgresql-client zsh && \ apt-get clean && rm -rf /var/lib/apt/lists/* @@ -9,3 +9,8 @@ RUN apt-get update && apt-get install -y \ WORKDIR /workspace COPY py/ /workspace/py/ RUN pip install -r /workspace/py/requirements.txt + +RUN chsh -s /bin/zsh vscode + +# Run zsh as the main process in interactive mode +CMD ["sleep", "infinity"] diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml index 2b31404..178003b 100644 --- a/.devcontainer/docker-compose.yaml +++ b/.devcontainer/docker-compose.yaml @@ -10,15 +10,12 @@ services: environment: DATABASE_URL: "postgres://postgres:postgres@db:5432/postgres" PYTHONPATH: "/workspace/py/packages" - # Set CI to true in the environment or default to false - CI: ${CI:-false} depends_on: - db ports: - "8000:8000" - # command: sleep infinity - # shell: /bin/zsh - entrypoint: "./.devcontainer/entrypoint.sh" + # runs CMD from Dockerfile right now + # entrypoint: "./.devcontainer/entrypoint.sh" db: image: postgres:17 diff --git a/.devcontainer/entrypoint.sh b/.devcontainer/entrypoint.sh index cfbae76..8480cf6 100755 --- a/.devcontainer/entrypoint.sh +++ b/.devcontainer/entrypoint.sh @@ -1,4 +1,3 @@ #!/bin/bash -git config --global --add safe.directory /workspace -sleep infinity +# sleep infinity diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 51cf5b7..15d416d 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -1,6 +1,8 @@ #!/bin/bash -echo "starting zsh..." +# random stuff ... hrm ... +# echo "starting zsh..." echo 'autoload -Uz add-zsh-hook; append_history() { fc -W }; add-zsh-hook precmd append_history; export HISTFILE=/home/vscode/.corpora.zsh_history/.zsh_history' >> ~/.zshrc alias tree="tree -I '.venv|node_modules|__pycache__|.git|.pytest_cache' -a" +# git config --global --add safe.directory /workspace zsh