Skip to content

Commit

Permalink
update docker to best practices, update readme, and update trunk yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mlpierce22 committed Feb 11, 2024
1 parent b5bfdfa commit ff812b3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
2 changes: 0 additions & 2 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ lint:
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
Expand Down
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
FROM python:3.10

WORKDIR /home

# Install python3 and parallel
RUN apt update && apt install -y parallel
# HEALTHCHECK instruction
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/ || exit 1

# Create a non-root user and switch to it
RUN useradd -m tea
USER tea

# Install parallel
RUN apt-get update && apt-get install -y parallel=20231222 --no-install-recommends && \
rm -rf /var/lib/apt/lists/*

# Alias python3 to python
RUN ln -s /usr/bin/python3 /usr/bin/python
Expand All @@ -13,6 +21,9 @@ COPY app app
COPY requirements.txt requirements.txt
COPY run_local.sh run_local.sh

# Set SHELL to use pipefail
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install ollama command line tool
RUN curl https://ollama.ai/install.sh | sh

Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ Tea makes frontend Vue development as easy as making a cup of tea: just heat, st

## Table of Contents

- [Introduction](#Introduction)
- [Usage](#Usage)
- [Examples](#Examples)
- [Features](#Features)
- [Configuration](#Configuration)
- [Choosing a Model](#Choosing-a-Model)
- [Improvements](#Improvements)
- [Contributors](#Contributors)
- [Inspirations](#Inspirations)
- [Connect](#Connect)
- [License](#License)
- [Introduction](#introduction)
- [Usage](#usage)
- [Examples](#examples)
- [Features](#features)
- [Configuration](#configuration)
- [Choosing a Model](#choosing-a-model)
- [Improvements](#improvements)
- [Contributors](#contributors)
- [Inspirations](#inspirations)
- [Connect](#connect)
- [License](#license)

## Usage

Expand All @@ -42,7 +42,7 @@ docker run -d \
3. Add a `<Tea>` component into your `Vue` template like you were creating a component and save. Generation should begin!
4. When you have generated to your heart's content, you can pour the tea by adding the `pour` prop like `pour="ComponentName"` and it will generate a component with that name, replacing the Tea component.

## Examples:
## Examples

### Generating a Tea component

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aiohttp==3.9.1
aiohttp==3.9.2
aiosignal==1.3.1
annotated-types==0.6.0
anyio==4.2.0
Expand Down Expand Up @@ -46,4 +46,4 @@ typing_extensions==4.9.0
urllib3==2.1.0
watchdog==3.0.0
wcmatch==8.5
yarl==1.9.4
yarl==1.9.4

0 comments on commit ff812b3

Please sign in to comment.