Skip to content

Commit 81bffe6

Browse files
eitiparamonau
authored andcommittedFeb 25, 2022
Add docker-compose support and fix error when docker executing
1. Added docker-compose 2. Fixed cluster.js error 3. Change node version in Dockerfile
1 parent bd8449e commit 81bffe6

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed
 

‎Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:12.18-alpine3.12
1+
FROM node:16-alpine3.14
22

33
EXPOSE 8061
44

‎cluster.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ GracefulCluster.start({
1010
restartOnTimeout: CONFIG.CLUSTER_WORKER_RESTART_ON_PERIOD,
1111
restartOnMemory: CONFIG.CLUSTER_WORKER_RESTART_ON_MEMORY_USED,
1212
serverFunction: function() {
13-
import('./server');
13+
import('./server.js');
1414
}
1515
});

‎docker-compose.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: "3"
2+
services:
3+
api:
4+
build:
5+
context: .
6+
dockerfile: Dockerfile
7+
container_name: iframely
8+
restart: always
9+
ports:
10+
- "8061:8061"

0 commit comments

Comments
 (0)
Please sign in to comment.