s4s-editor / Dockerfile
soiz1's picture
Update Dockerfile
a164cd0 verified
# ベースイメージとして Node.js を使用
FROM node:18
# 作業ディレクトリを設定
WORKDIR /app
# ホストのファイルをコンテナにコピー
COPY . .
# detection_ja.sh に実行権限を付与
RUN chmod +x ./replace_ja.sh
RUN chmod +x ./upload.sh
RUN apt-get update && apt-get install -y python3 python3-pip
RUN apt-get update && \
apt-get install -y jq git-lfs zip rsync && \
git lfs install
RUN ./replace_ja.sh
ARG github_token
# translations ディレクトリを作成し、権限を設定
RUN mkdir -p /app/translations && chmod -R 777 /app/translations
RUN chmod -R 777 /app
# 依存関係をインストール(競合を無視)
RUN npm install --legacy-peer-deps
# OpenSSL の互換オプションを有効化
ENV NODE_OPTIONS="--openssl-legacy-provider"
RUN pip install huggingface_hub --break-system-packages
# コンテナの起動時にサーバーを実行
#CMD /bin/sh -c "python3 upload.py && npm start"
CMD /bin/sh -c "BUILD_MODE=dist npm run build && npm start"
#CMD /bin/sh -c "npm start"
# コンテナがリッスンするポート
EXPOSE 3000