mirror of
https://github.com/e621ng/dtext_rb.git
synced 2025-03-04 03:03:03 -05:00
Add dockerfile and more readme instructions
This commit is contained in:
parent
f4f28cfdc5
commit
f322c8fcc9
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM ruby:3.1.2-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
libglib2.0-dev \
|
||||
ragel \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY Gemfile Gemfile.lock ./
|
||||
RUN gem install bundler:2.3.12 && \
|
||||
bundle install -j$(nproc)
|
||||
|
||||
WORKDIR /app
|
@ -5,3 +5,12 @@ Uses the [ragel state machine](https://github.com/adrian-thurston/ragel) to gene
|
||||
## Getting started
|
||||
|
||||
Most of the changes will only need to touch `dtext.rl`, the rest of the files will be generated for you by running either `rake compile` or `rake test`. Take a look at [this inofficial quickstart guide](https://github.com/calio/ragel-cheat-sheet) or the [complete official documentation](http://www.colm.net/files/ragel/ragel-guide-6.10.pdf) if you want to know more about how ragel works.
|
||||
|
||||
There's a `docker-compose.yml` which you can use to quickly run the most common commands without installing everything locally. Usable like this: `docker-compose run --rm rake test`. You will need to run `docker-compse build` once beforehand.
|
||||
|
||||
## Releasing a new version for usage in e621
|
||||
|
||||
Commit the changes to `dtext.rl` and the resuling changes in `dtext.c`. Bump the version number in `dtext_rb.gemspec` and `VERSION`. After that is all done you can `bundle lock` in the e6 repository. It should pick up on the increased version.
|
||||
|
||||
To test these changes locally commit them and update the `Gemfile`s dtext entry. Specifying the commit hash allows you to rebuild the container without having to also increment the version number every time. Don't forget to `bundle lock` before rebuilding.
|
||||
`gem "dtext_rb", git: "https://github.com/YOUR_FORK/dtext_rb.git", ref: "YOUR_COMMIT_HASH"`
|
||||
|
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
dtext:
|
||||
build: ./
|
||||
image: dtext
|
||||
volumes:
|
||||
- .:/app
|
||||
|
||||
rake:
|
||||
image: dtext
|
||||
volumes:
|
||||
- .:/app
|
||||
entrypoint: rake
|
||||
profiles:
|
||||
- "rake"
|
Loading…
Reference in New Issue
Block a user