refactor: remove support for DOKKU_SCALE file
It has been replaced by the 'formations' key within the 'app.json' file format.
This commit is contained in:
5
tests/apps/dockerfile-app-json-formations/CHECKS
Normal file
5
tests/apps/dockerfile-app-json-formations/CHECKS
Normal file
@@ -0,0 +1,5 @@
|
||||
WAIT=2 # wait 2 seconds
|
||||
TIMEOUT=5 # set timeout to 5 seconds
|
||||
ATTEMPTS=2 # try 2 times
|
||||
|
||||
/ nodejs/express
|
||||
13
tests/apps/dockerfile-app-json-formations/Dockerfile
Normal file
13
tests/apps/dockerfile-app-json-formations/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM node:19-alpine
|
||||
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
EXPOSE 3001/udp
|
||||
EXPOSE 3000/tcp
|
||||
EXPOSE 3003
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN npm install
|
||||
|
||||
CMD npm start
|
||||
8
tests/apps/dockerfile-app-json-formations/Procfile
Normal file
8
tests/apps/dockerfile-app-json-formations/Procfile
Normal file
@@ -0,0 +1,8 @@
|
||||
###############################
|
||||
# DEVELOPMENT #
|
||||
###############################
|
||||
|
||||
# Procfile for development using the new threaded worker (scheduler, twitter stream and delayed job)
|
||||
cron: node worker.js
|
||||
web: node web.js
|
||||
worker: node worker.js
|
||||
7
tests/apps/dockerfile-app-json-formations/app.json
Normal file
7
tests/apps/dockerfile-app-json-formations/app.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"formation": {
|
||||
"web": {
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
5
tests/apps/dockerfile-app-json-formations/check_deploy
Executable file
5
tests/apps/dockerfile-app-json-formations/check_deploy
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
output="$(curl -s -S "$1")"
|
||||
echo "$output"
|
||||
test "$output" == "nodejs/express"
|
||||
13
tests/apps/dockerfile-app-json-formations/package.json
Normal file
13
tests/apps/dockerfile-app-json-formations/package.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "node-example",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"express": "4.18.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.2.x"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "false"
|
||||
}
|
||||
}
|
||||
12
tests/apps/dockerfile-app-json-formations/web.js
Normal file
12
tests/apps/dockerfile-app-json-formations/web.js
Normal file
@@ -0,0 +1,12 @@
|
||||
var express = require('express');
|
||||
|
||||
var app = express();
|
||||
|
||||
app.get('/', function(request, response) {
|
||||
response.send('nodejs/express');
|
||||
});
|
||||
|
||||
var port = process.env.PORT || 5000;
|
||||
app.listen(port, function() {
|
||||
console.log("Listening on " + port);
|
||||
});
|
||||
6
tests/apps/dockerfile-app-json-formations/worker.js
Normal file
6
tests/apps/dockerfile-app-json-formations/worker.js
Normal file
@@ -0,0 +1,6 @@
|
||||
function worker() {
|
||||
console.log('sleeping for 60 seconds');
|
||||
setTimeout(worker, 60 * 1000);
|
||||
}
|
||||
|
||||
worker();
|
||||
Reference in New Issue
Block a user