Add a Makefile for easy building
This commit is contained in:
parent
867c7f9993
commit
83308564ef
5 changed files with 78 additions and 2 deletions
13
.dockerignore
Normal file
13
.dockerignore
Normal file
|
@ -0,0 +1,13 @@
|
|||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
npm-debug.log
|
||||
test/unit/coverage
|
||||
test/e2e/reports
|
||||
selenium-debug.log
|
||||
.idea/
|
||||
config/local.json
|
||||
config/local.*.json
|
||||
docs/site/
|
||||
.vscode/
|
||||
akkoma-fe.zip
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,4 +9,5 @@ selenium-debug.log
|
|||
config/local.json
|
||||
config/local.*.json
|
||||
docs/site/
|
||||
.vscode/
|
||||
.vscode/
|
||||
akkoma-fe.zip
|
||||
|
|
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM node:20.5.0-alpine3.18
|
||||
|
||||
RUN apk add --no-cache \
|
||||
git \
|
||||
chromium-chromedriver
|
||||
|
||||
# use chromedriver from apk
|
||||
ENV CHROMEDRIVER_FILEPATH=/usr/bin/chromedriver
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
COPY ./package.json /app/package.json
|
||||
COPY ./yarn.lock /app/yarn.lock
|
||||
|
||||
RUN yarn \
|
||||
&& yarn cache clean
|
||||
|
||||
COPY . /app/
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
ENTRYPOINT [ "yarn", "run" ]
|
29
Makefile
Normal file
29
Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
RUNTIME ?= docker
|
||||
BUILD_DIR ?= ./dist/
|
||||
OUTFILE_ZIP ?= ./akkoma-fe.zip
|
||||
|
||||
.PHONY: all
|
||||
all: build-docker build-fe package
|
||||
|
||||
.PHONY: build-docker
|
||||
build-docker:
|
||||
$(RUNTIME) build -t akkoma-fe-builder .
|
||||
|
||||
.PHONY: build-fe
|
||||
build-fe:
|
||||
ifeq ("$(wildcard $(BUILD_DIR))","")
|
||||
mkdir $(BUILD_DIR)
|
||||
else
|
||||
rm -rf $(BUILD_DIR)
|
||||
mkdir $(BUILD_DIR)
|
||||
endif
|
||||
$(RUNTIME) run -v ${PWD}/dist/:/app/dist/:Z akkoma-fe-builder build
|
||||
|
||||
.PHONY: package
|
||||
package:
|
||||
ifneq ("$(wildcard $(OUTFILE_ZIP))","")
|
||||
rm $(OUTFILE_ZIP)
|
||||
endif
|
||||
zip -r $(OUTFILE_ZIP) $(BUILD_DIR)
|
||||
|
||||
# vim:set noexpandtab:
|
13
README.md
13
README.md
|
@ -1,12 +1,23 @@
|
|||
## What is this?
|
||||
|
||||
This is a fork of [AkkomaGang/akkoma-fe](https://akkoma.dev/AkkomaGang/akkoma-fe/), with a custom theme.
|
||||
This is a fork of [AkkomaGang/akkoma-fe](https://akkoma.dev/AkkomaGang/akkoma-fe/), with a custom theme and Makefile.
|
||||
|
||||
The differences from the upstream repository are described below:
|
||||
|
||||
- Added a Makefile where you can build the client inside a Docker container
|
||||
- Added and changed the default theme to a custom one
|
||||
- Removed some themes to save network bandwidth
|
||||
|
||||
### How to build
|
||||
|
||||
```sh
|
||||
# Docker
|
||||
make
|
||||
|
||||
# Podman
|
||||
make RUNTIME=podman
|
||||
```
|
||||
|
||||
## Akkoma-FE
|
||||
|
||||
![English OK](https://img.shields.io/badge/English-OK-blueviolet?style=for-the-badge) ![日本語OK](https://img.shields.io/badge/%E6%97%A5%E6%9C%AC%E8%AA%9E-OK-blueviolet?style=for-the-badge)
|
||||
|
|
Loading…
Reference in a new issue