Skip to content

Commit

Permalink
Add docker-compose support and fix error when docker executing
Browse files Browse the repository at this point in the history
1. Added docker-compose
2. Fixed cluster.js error
3. Change node version in Dockerfile
  • Loading branch information
eit authored and iparamonau committed Feb 25, 2022
1 parent bd8449e commit 81bffe6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12.18-alpine3.12
FROM node:16-alpine3.14

EXPOSE 8061

Expand Down
2 changes: 1 addition & 1 deletion cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ GracefulCluster.start({
restartOnTimeout: CONFIG.CLUSTER_WORKER_RESTART_ON_PERIOD,
restartOnMemory: CONFIG.CLUSTER_WORKER_RESTART_ON_MEMORY_USED,
serverFunction: function() {
import('./server');
import('./server.js');
}
});
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: iframely
restart: always
ports:
- "8061:8061"

0 comments on commit 81bffe6

Please sign in to comment.