This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Sub.Dockerfile
112 lines (101 loc) · 8.14 KB
/
Sub.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
FROM node:14.15.1-alpine AS runtime-sub
WORKDIR /usr/app
RUN apk add --no-cache --virtual .ojt git
RUN apk add --no-cache --virtual .gyp python make g++
RUN yarn global add pm2 lerna
ENV HTS_VOICE_NORMAL /usr/app/packages/util/open-jtalk/htsvoice/hts_voice_nitech_jp_atr503_m001-1.05/nitech_jp_atr503_m001.htsvoice
ENV HTS_VOICE_ANGRY /usr/app/packages/util/open-jtalk/htsvoice/htsvoice-tohoku-f01-master/tohoku-f01-angry.htsvoice
ENV HTS_VOICE_HAPPY /usr/app/packages/util/open-jtalk/htsvoice/htsvoice-tohoku-f01-master/tohoku-f01-happy.htsvoice
ENV HTS_VOICE_NEUTRAL /usr/app/packages/util/open-jtalk/htsvoice/htsvoice-tohoku-f01-master/tohoku-f01-neutral.htsvoice
ENV HTS_VOICE_SAD /usr/app/packages/util/open-jtalk/htsvoice/htsvoice-tohoku-f01-master/tohoku-f01-sad.htsvoice
ENV HTS_VOICE_MEI_ANGRY /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/mei/mei_angry.htsvoice
ENV HTS_VOICE_MEI_BASHFUL /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/mei/mei_bashful.htsvoice
ENV HTS_VOICE_MEI_HAPPY /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/mei/mei_happy.htsvoice
ENV HTS_VOICE_MEI_NORMAL /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/mei/mei_normal.htsvoice
ENV HTS_VOICE_MEI_SAD /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/mei/mei_sad.htsvoice
ENV HTS_VOICE_TAKUMI_ANGRY /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/takumi/takumi_angry.htsvoice
ENV HTS_VOICE_TAKUMI_HAPPY /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/takumi/takumi_happy.htsvoice
ENV HTS_VOICE_TAKUMI_NORMAL /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/takumi/takumi_normal.htsvoice
ENV HTS_VOICE_TAKUMI_SAD /usr/app/packages/util/open-jtalk/htsvoice/MMDAgent_Example-1.8/Voice/takumi/takumi_sad.htsvoice
ENV HTS_VOICE_ALPHA /usr/app/packages/util/open-jtalk/htsvoice/VoiceAlpha.htsvoice
ENV HTS_VOICE_BETA /usr/app/packages/util/open-jtalk/htsvoice/VoiceBeta.htsvoice
ENV HTS_VOICE_GAMMA /usr/app/packages/util/open-jtalk/htsvoice/VoiceGamma.htsvoice
ENV HTS_VOICE_DELTA /usr/app/packages/util/open-jtalk/htsvoice/VoiceDelta.htsvoice
ENV KUROMOJI_DIC_PATH /usr/app/packages/util/kuromoji-js/dict
COPY packages/util/open-jtalk/htsvoice ./packages/util/open-jtalk/htsvoice
COPY packages/util/kuromoji-js/dict /usr/app/packages/util/kuromoji-js/dict
COPY lerna.json ./
COPY tsconfig.json ./
COPY package.json ./
COPY yarn.lock ./
COPY packages/util/sound-mixing-proto/package.json ./packages/util/sound-mixing-proto/package.json
COPY packages/util/monitor-discord.js/package.json ./packages/util/monitor-discord.js/package.json
COPY packages/util/rate-limit/package.json ./packages/util/rate-limit/package.json
COPY packages/util/@guild-utils/command-base/package.json ./packages/util/@guild-utils/command-base/package.json
COPY packages/util/@guild-utils/command-parser/package.json ./packages/util/@guild-utils/command-parser/package.json
COPY packages/util/@guild-utils/command-schema/package.json ./packages/util/@guild-utils/command-schema/package.json
COPY packages/util/@guild-utils/command-types/package.json ./packages/util/@guild-utils/command-types/package.json
COPY packages/util/@guild-utils/command-types-discord.js/package.json ./packages/util/@guild-utils/command-types-discord.js/package.json
COPY packages/domains/meta/package.json ./packages/domains/meta/package.json
COPY packages/domains/repository-error/package.json ./packages/domains/repository-error/package.json
COPY packages/domains/guild-tts-target-channels/package.json ./packages/domains/guild-tts-target-channels/package.json
COPY packages/domains/guild-configs/package.json ./packages/domains/guild-configs/package.json
COPY packages/domains/text2speech/package.json ./packages/domains/text2speech/package.json
COPY packages/domains/voice-configs/package.json ./packages/domains/voice-configs/package.json
COPY packages/domains/guild-configs/package.json ./packages/domains/guild-configs/package.json
COPY packages/repository/cache-guild-configs/package.json ./packages/repository/cache-guild-configs/package.json
COPY packages/repository/mongodb-guild-configs/package.json ./packages/repository/mongodb-guild-configs/package.json
COPY packages/repository/cache-guild-tts-target-channels/package.json ./packages/repository/cache-guild-tts-target-channels/package.json
COPY packages/repository/mongodb-guild-tts-target-channels/package.json ./packages/repository/mongodb-guild-tts-target-channels/package.json
COPY packages/usecase/text2speech/package.json ./packages/usecase/text2speech/package.json
COPY packages/usecase/text2speech-grpc/package.json ./packages/usecase/text2speech-grpc/package.json
COPY packages/protocol/configurate-usecase/package.json ./packages/protocol/configurate-usecase/package.json
COPY packages/protocol/protos/package.json ./packages/protocol/protos/package.json
COPY packages/protocol/rpc-client/package.json ./packages/protocol/rpc-client/package.json
COPY packages/protocol/command-schema-core/package.json ./packages/protocol/command-schema-core/package.json
COPY packages/protocol/command-schema-core-bootstrap/package.json ./packages/protocol/command-schema-core-bootstrap/package.json
COPY packages/protocol/util-djs/package.json ./packages/protocol/util-djs/package.json
COPY packages/presentation/core/package.json ./packages/presentation/core/package.json
COPY packages/presentation/sub/package.json ./packages/presentation/sub/package.json
COPY packages/languages/command-core/package.json ./packages/languages/command-core/package.json
RUN lerna bootstrap && apk del .ojt && apk del .gyp
COPY .eslintrc.json ./
COPY packages/util/sound-mixing-proto ./packages/util/sound-mixing-proto
COPY packages/util/monitor-discord.js ./packages/util/monitor-discord.js
COPY packages/util/rate-limit ./packages/util/rate-limit
COPY packages/util/@guild-utils/command-base ./packages/util/@guild-utils/command-base
COPY packages/util/@guild-utils/command-parser ./packages/util/@guild-utils/command-parser
COPY packages/util/@guild-utils/command-schema ./packages/util/@guild-utils/command-schema
COPY packages/util/@guild-utils/command-types ./packages/util/@guild-utils/command-types
COPY packages/util/@guild-utils/command-types-discord.js ./packages/util/@guild-utils/command-types-discord.js
COPY packages/domains/meta ./packages/domains/meta
COPY packages/domains/repository-error ./packages/domains/repository-error
COPY packages/domains/guild-tts-target-channels ./packages/domains/guild-tts-target-channels
COPY packages/domains/guild-configs ./packages/domains/guild-configs
COPY packages/domains/text2speech ./packages/domains/text2speech
COPY packages/domains/voice-configs ./packages/domains/voice-configs
COPY packages/repository/cache-guild-configs ./packages/repository/cache-guild-configs
COPY packages/repository/mongodb-guild-configs ./packages/repository/mongodb-guild-configs
COPY packages/repository/cache-guild-tts-target-channels ./packages/repository/cache-guild-tts-target-channels
COPY packages/repository/mongodb-guild-tts-target-channels ./packages/repository/mongodb-guild-tts-target-channels
COPY packages/usecase/text2speech ./packages/usecase/text2speech
COPY packages/usecase/text2speech-grpc ./packages/usecase/text2speech-grpc
COPY packages/protocol/configurate-usecase ./packages/protocol/configurate-usecase
COPY packages/protocol/protos ./packages/protocol/protos
COPY packages/protocol/rpc-client ./packages/protocol/rpc-client
COPY packages/protocol/command-schema-core ./packages/protocol/command-schema-core
COPY packages/protocol/command-schema-core-bootstrap ./packages/protocol/command-schema-core-bootstrap
COPY packages/protocol/util-djs ./packages/protocol/util-djs
COPY packages/presentation/core ./packages/presentation/core
COPY packages/presentation/sub ./packages/presentation/sub
COPY packages/languages/command-core ./packages/languages/command-core
RUN lerna run build \
&& lerna run test:lint \
&& yarn global remove lerna \
&& yarn cache clean
COPY docker-entrypoint.sh ./entrypoint.sh
RUN date >/build-date
ARG GIT_SHORT_COMMIT_HASH
ENV GIT_SHORT_COMMIT_HASH ${GIT_SHORT_COMMIT_HASH:-xxxxxxx}
ENTRYPOINT ["sh","entrypoint.sh"]
CMD ["node","./packages/presentation/sub/dist/main.js"]