Skip to content

Commit

Permalink
feat: 🎸 improve ll
Browse files Browse the repository at this point in the history
  • Loading branch information
lagleki committed Sep 28, 2023
1 parent 04aaa4e commit e6a8651
Show file tree
Hide file tree
Showing 15 changed files with 10,320 additions and 6,487 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
- name: Run Docker container
uses: kohlerdominik/docker-run-action@v1
with:
run: yarn && npx playwright install chromium && npx playwright install-deps && yarn build && yarn clean
run: npm install && npx playwright install chromium && npx playwright install-deps && npm run cicd
image: lojban:latest
environment: |
GOOGLE_LOJBAN_CORPUS_DOC_ID=${{ secrets.GOOGLE_LOJBAN_CORPUS_DOC_ID }}
GOOGLE_READONLY_API_KEY=${{ secrets.GOOGLE_READONLY_API_KEY }}
# image: lojban:${{ env.TAG_NAME }}
volumes: |
/output:/app/src/out
/output:/app/src/out1
${{ github.workspace }}/data/config:/app/src/config \
${{ github.workspace }}/data/pages:/app/src/md_pages \
${{ github.workspace }}/data/assets:/app/src/public/assets \
Expand Down
25 changes: 19 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
FROM ubuntu:latest
FROM ubuntu:focal

RUN apt-get update

# set timezone to avoid questions in CLI
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# install common
RUN apt-get install -y vim bash curl gnupg2

Expand All @@ -12,9 +16,17 @@ RUN apt-get install -y python3 python3-pip
RUN apt-get install -y ghostscript

# install nodejs
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get update && \
apt-get install -y nodejs
RUN set -uex; \
apt-get update; \
apt-get install -y ca-certificates curl gnupg; \
mkdir -p /etc/apt/keyrings; \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
NODE_MAJOR=20; \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \
> /etc/apt/sources.list.d/nodesource.list; \
apt-get update; \
apt-get install nodejs -y;
RUN npm install -g yarn

# install fonts
Expand All @@ -27,6 +39,7 @@ RUN apt-get autoclean && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app/src
WORKDIR /app/src

RUN npx playwright install chromium && npx playwright install-deps
RUN npx playwright install chromium
RUN npx playwright install-deps

# RUN yarn
# RUN yarn
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ GOOGLE_LOJBAN_CORPUS_DOC_ID=1_vkiwqOIOIJPqZTiomzd4ApUSEQXhEY6CeyZD_6c-PA is an e
```
* `make build` - you can use it only once
* `make dev` - run the docker container
* run `yarn` in the docker console
* `yarn dev` - run the website in dev mode locally, access it at http://localhost:3298/
* `yarn compile` - compile to a static folder
* run `npm i` in the docker console
* `npm run dev` - run the website in dev mode locally, access it at http://localhost:3298/
* `npm run build && npm run start` - compile to a static folder and run it locally at http://localhost:3298/
Loading

0 comments on commit e6a8651

Please sign in to comment.