Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "markdownで書かれた翻訳は、GitHub Flavored Markdownを利用したい" #66

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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