GPTfree api commited on
Commit
94bb9fd
·
verified ·
1 Parent(s): 3af7936

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -15
Dockerfile CHANGED
@@ -1,32 +1,28 @@
1
- # Use Node.js 16 runtime
2
  FROM node:16
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Install dependencies required for native bindings
8
  RUN apt-get update && apt-get install -y python3 build-essential
9
 
10
- # Clone the Rammerhead repository
11
  RUN git clone https://github.com/s-tn/rammerhead-heroku.git .
12
 
13
- # Clean up any previous build files
14
- RUN rm -rf package-lock.json node_modules
15
-
16
- # Ensure npm is compatible with Node.js 16
17
  RUN npm install -g [email protected]
18
 
19
- # Install project dependencies
20
  RUN npm install --legacy-peer-deps --ignore-scripts
21
-
22
- # Rebuild sqlite3 native bindings
23
  RUN npm rebuild sqlite3
24
 
25
- # Build the project
26
  RUN npm run build
27
 
28
- # Expose the necessary port
 
29
  EXPOSE 8080
30
 
31
- # Start the server
32
- CMD [ "node", "src/server.js" ]
 
1
+ # Node.js 16イメージをベースにする
2
  FROM node:16
3
 
4
+ # 作業ディレクトリを設定
5
  WORKDIR /app
6
 
7
+ # 必要な依存パッケージをインストール
8
  RUN apt-get update && apt-get install -y python3 build-essential
9
 
10
+ # リポジトリをクローン
11
  RUN git clone https://github.com/s-tn/rammerhead-heroku.git .
12
 
13
+ # npmのバージョンを明示的に固定
 
 
 
14
  RUN npm install -g [email protected]
15
 
16
+ # アプリの依存関係をインストール
17
  RUN npm install --legacy-peer-deps --ignore-scripts
 
 
18
  RUN npm rebuild sqlite3
19
 
20
+ # アプリをビルド
21
  RUN npm run build
22
 
23
+ # 優先ポートとフォールバックポートを公開
24
+ EXPOSE 443
25
  EXPOSE 8080
26
 
27
+ # サーバーを起動
28
+ CMD ["node", "src/server.js"]