Skip to content

Commit fc063ad

Browse files
author
Drew Yang
committed
fix: 🎨 improve docker build
1 parent d805d0c commit fc063ad

File tree

6 files changed

+19
-25
lines changed

6 files changed

+19
-25
lines changed

‎.docker/Dockerfile‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎.docker/apk_requirements.txt‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.github/workflows/development.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- name: Compile docs static artifacts
1616
run: |
17-
GITHUB_TOKEN=$DJBOT_GH_TOKEN MODE=BUILD HOST_UID=$(id -u) docker compose up --exit-code-from docs --build
17+
BOT_PAT=$DJBOT_GH_TOKEN MODE=BUILD HOST_UID=$(id -u) docker compose up --exit-code-from docs --build
1818
- name: Commit documentation changes
1919
run: |
2020
git clone https://github.com/${GITHUB_REPOSITORY}.git \

‎Dockerfile‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM python:3-alpine
2+
3+
WORKDIR /main
4+
COPY mkdocs.yaml mkdocs.yaml
5+
COPY src/ src/
6+
COPY pip_requirements.txt pip_requirements.txt
7+
8+
ARG BOT_PAT
9+
RUN \
10+
apk add --no-cache git && \
11+
pip install --no-cache-dir -r /main/pip_requirements.txt
12+
#&& \
13+
#pip install --no-cache git+https://${BOT_PAT}@github.com/datajoint/mkdocs-material-insiders.git@master

‎docker-compose.yaml‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
# MODE="LIVE|BUILD" HOST_UID=$(id -u) docker compose up --build
2-
#
3-
# Navigate to http://localhost/
4-
version: "2.4"
1+
# MODE="LIVE|BUILD" docker compose up --build
2+
#
3+
# Navigate to http://localhost/docs/
54
services:
65
docs:
76
build:
8-
dockerfile: .docker/Dockerfile
9-
context: .
107
args:
11-
- GITHUB_TOKEN
8+
- BOT_PAT
129
image: datajoint/datajoint-docs
1310
environment:
1411
- MODE
1512
volumes:
1613
- .:/main
17-
user: ${HOST_UID}:anaconda
1814
ports:
1915
- 80:80
2016
command:
@@ -23,7 +19,7 @@ services:
2319
- |
2420
set -e
2521
if echo "$${MODE}" | grep -i live &>/dev/null; then
26-
mkdocs serve --config-file ./mkdocs.yaml -a 0.0.0.0:80
22+
mkdocs serve --config-file ./mkdocs.yaml
2723
elif echo "$${MODE}" | grep -i build &>/dev/null; then
2824
mkdocs build --config-file ./mkdocs.yaml
2925
else

0 commit comments

Comments
 (0)