Skip to content

Commit

Permalink
still futzing
Browse files Browse the repository at this point in the history
  • Loading branch information
skyl committed Oct 27, 2024
1 parent 01dcbdd commit 4233a80
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/*
Expand All @@ -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"]
7 changes: 2 additions & 5 deletions .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .devcontainer/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash

git config --global --add safe.directory /workspace
sleep infinity
# sleep infinity
4 changes: 3 additions & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4233a80

Please sign in to comment.