Skip to content

Commit

Permalink
poetry-update installs deps on web container
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Aug 16, 2023
1 parent fade296 commit 160a14d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
13 changes: 11 additions & 2 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
FROM ghcr.io/nationalarchives/tna-python-django:latest

USER root

RUN apt-get update; \
apt-get install -y ca-certificates curl gnupg; \
install -m 0755 -d /etc/apt/keyrings; \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg; \
chmod a+r /etc/apt/keyrings/docker.gpg; \
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null; \
apt-get update; \
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

COPY --chown=app dev/bin /home/app/.local/bin/dev
RUN chmod +x -fR /home/app/.local/bin/dev
ENV PATH="/home/app/.local/bin/dev:$PATH"
Expand All @@ -12,6 +23,4 @@ RUN setup-npm

COPY --chown=app . .

USER root

CMD ["welcome"]
4 changes: 4 additions & 0 deletions dev/bin/update-poetry
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/bash

poetry update

docker ps

docker exec -it web poetry install --sync --no-root
5 changes: 2 additions & 3 deletions dev/bin/welcome
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ echo " ,'_\`--'____\`--'_\`. .---------------------------
echo " _: ____________ :_ | |"
echo " | | ||::::::::::|| | | | Awaiting your command... |"
echo " | | ||::::::::::|| | | | |"
echo " | | ||::::::::::|| | | | .----------------------------^"
echo " |_| |/__________\\| |_| |/"
echo " |________________|"
echo " |_| |/__________\\| |_| | .----------------------------^"
echo " |________________| |/"
echo " __..-' \`-..__"
echo " .-| : .----------------. : |-."
echo " ,\\ || | |\\______________/| | || /."
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ services:
restart: always
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- web
- db
Expand Down

0 comments on commit 160a14d

Please sign in to comment.