Skip to content

Commit

Permalink
Merge pull request #53 from hylarucoder/tailwind-htmx
Browse files Browse the repository at this point in the history
Tailwind htmx
  • Loading branch information
hylarucoder authored Mar 23, 2024
2 parents 16899ba + 2af0ffe commit 282e724
Show file tree
Hide file tree
Showing 54 changed files with 4,941 additions and 3,318 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,5 @@ ENV/
config.yaml
.volume
elasticsearch-analysis-ik
.pytest_cache
.pytest_cache
node_modules/
25 changes: 6 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ test.verbose: ## test.verbose
docker-compose run --rm tifa-toolbox-test bash -c "python -m pytest tests -v --pdb --pdbcls=IPython.terminal.debugger:Pdb"

format: ## publish package to pypi
black tifa
black tests
poetry run ruff format .

shell_plus:
docker-compose run --rm tifa-toolbox bash -c "tifa-cli shell_plus"
Expand Down Expand Up @@ -64,25 +63,13 @@ worker: ## worker
monitor: ## flower
docker-compose up tifa-monitor

watch-css: ## flower
npx tailwindcss -i ./tifa/static/css/input.css -o ./tifa/static/css/main.css --watch

# docker images

build-tifa: ## > tifa
docker build -t 'twocucao/tifa:latest' -f 'compose/app/Dockerfile' .
docker build -t 'tifa:local' -f 'compose/app/Dockerfile' .

build-tifa-no-cache: ## > tifa
docker build -t 'twocucao/tifa:latest' -f 'compose/app/Dockerfile' --no-cache .

build-elasticsearch: ## > elasticsearch
docker build -t 'elasticsearch:local' -f 'compose/elasticsearch/Dockerfile' .

build-elasticsearch-no-cache: ## > elasticsearch
docker build -t 'elasticsearch:local' -f 'compose/elasticsearch/Dockerfile' . --no-cache

publish-tifa-image: ## > build and publish tifa image
echo ${DOCKER_PASS} | docker login -u twocucao --password-stdin
docker pull twocucao/tifa:latest || true
docker build -t 'tifa:latest' -f 'compose/app/Dockerfile' . --cache-from=twocucao/tifa:latest
docker tag 'tifa:latest' twocucao/tifa:latest
docker push twocucao/tifa:latest || true


docker build -t 'tifa:local' -f 'compose/app/Dockerfile' --no-cache .
28 changes: 20 additions & 8 deletions compose/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
FROM python:3.10.9-buster
FROM python:3.11.8-bullseye
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update &&\
apt-get upgrade -y &&\
apt-get install -y \
vim \
git \
gcc \
liblzma-dev \
build-essential \
libffi-dev \
cmake \
curl \
freetds-bin \
gcc \
git \
krb5-user \
ldap-utils \
libffi6 \
libbz2-dev \
libffi-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsasl2-2 \
libsasl2-modules \
libsqlite3-dev \
libssl-dev \
libssl1.1 \
llvm \
locales \
lsb-release \
sasl2-bin \
sqlite3 \
unixodbc

unixodbc \
vim \
wget \
xz-utils \
zlib1g-dev \
tk-dev

ENV PYPI=https://mirrors.cloud.tencent.com/pypi/simple
ENV PIP_DEFAULT_TIMEOUT=1000
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

x-tifa-common:
&tifa-common
image: twocucao/tifa:latest
image: tifa:local
volumes:
- .:/opt/tifa
environment:
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"devDependencies": {
"tailwindcss": "^3.4.1"
}
}
Loading

0 comments on commit 282e724

Please sign in to comment.