Skip to content

Commit

Permalink
Revert "markdownで書かれた翻訳は、GitHub Flavored Markdownを利用したい"
Browse files Browse the repository at this point in the history
  • Loading branch information
kfly8 authored Apr 25, 2024
1 parent 5d2da6c commit de76793
Show file tree
Hide file tree
Showing 10 changed files with 409 additions and 411 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/update-cpanfile-snapshot.yml

This file was deleted.

26 changes: 14 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@ RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y wget gcc g++ make sqlite3

RUN cpm install -g Carton

WORKDIR /usr/src/app

COPY cpanfile cpanfile.snapshot .

ENV PLACK_ENV=docker
ENV PERL5LIB=/usr/src/app/local/lib/perl5
ENV PATH=/usr/src/app/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin


FROM base as app

RUN carton install --deployment
COPY cpanfile ./
RUN cpm install
COPY . .

RUN sqlite3 perldocjp.master.db < sql/sqlite.sql
RUN cp perldocjp.master.db perldocjp.slave.db

ENV PLACK_ENV=docker
ENV PERL5LIB=/usr/src/app/local/lib/perl5
ENV PATH=/usr/src/app/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# 翻訳データの更新
RUN perl script/update.pl


# テスト用のステージ
FROM base as test
RUN cpm install --with-test --with-develop --show-build-log-on-failure

# サーバーを起動したい時のステージ
FROM base as web
CMD ["./local/bin/plackup", "-p", "5000", "-Ilib", "app.psgi"]
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@

.PHONY: build
build:
docker compose build
docker-compose -f docker-compose.yml build web

.PHONY: up
up:
docker compose up
make build
docker-compose -f docker-compose.yml up -d web

.PHONY: down
down:
docker compose down
docker-compose -f docker-compose.yml down

.PHONY: test
test: TEST_TARGET = t
test:
docker compose run --rm app prove -lrv $(TEST_TARGET)
docker-compose -f docker-compose.yml build test
docker-compose -f docker-compose.yml run test prove -Ilib -r -v t
4 changes: 1 addition & 3 deletions cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ requires 'DBIx::TransactionManager';
requires 'Regexp::Common';
requires 'Regexp::Assemble';
requires 'Text::Diff::FormattedHTML';
requires 'YAML::Tiny'; # for Markdown::Perl
requires 'Unicode::CaseFold'; # for Markdown::Perl
requires 'Markdown::Perl' => '1.03';
requires 'Text::Markdown';
requires 'SQL::Interp';
requires 'Carp::Clan';
requires 'JSON';
Expand Down
Loading

0 comments on commit de76793

Please sign in to comment.