Closed niklasgrewe closed 4 years ago
I don't know if this is helpful, but my Nodejs application is listening on port 3000
my package.json
looks like this:
{
"name": "grewe.io",
"description": "Website about Niklas Grewe",
"version": "0.0.1",
"scripts": {
"dev": "sapper dev",
"build": "npm run build:tailwind && sapper build",
"export": "sapper export --legacy",
"start": "node __sapper__/build",
"cy:run": "cypress run",
"cy:open": "cypress open",
"test": "run-p --race dev cy:run",
"watch:tailwind": "postcss static/tailwind.css -o static/index.css -w",
"build:tailwind": "NODE_ENV=production postcss static/tailwind.css -o static/index.css"
}
and my server.js
looks like this:
import sirv from 'sirv';
import polka from 'polka';
import compression from 'compression';
import * as sapper from '@sapper/server';
const { PORT, NODE_ENV } = process.env;
const dev = NODE_ENV === 'development';
polka() // You can also use Express
.use(
compression({ threshold: 0 }),
sirv('static', { dev }),
sapper.middleware()
)
.listen(PORT, err => {
if (err) console.log('error', err);
});
@niklasgrewe seems like something goes wrong immediately after docker build.
could you please share the logs from exoframe-server using docker logs exoframe-server[-hash]
command on your server?
@niklasgrewe I think I might've figured out why that happens.
could you please also try removing exoframe-plugin-swarm
from plugins, restarting server and trying to deploy again?
@yamalight when i remove the exoframe-plugin-swarm
from plugins, deployment works:
Your project is now deployed as:
ID URL Hostname Type
exo-id... grewe.io Not set Container
but when i surfe to grewe.io
i get the error in Browser Window: Bad Gateway
How can i fix that?
@niklasgrewe seems like you are not using port 80 for your deployment. you either need to use port 80 (see docs), or pass a traefik label with your port, or define a custom Dockerfile that uses your port
@yamalight it works now... thanks for your help
Hey everyone thank you very much for this piece of software - very cool and useful
i am using the
latest stable version
of exoframe client and server.my
server.config.yml
file looks like this:my
exoframe.json
file inside mysapper project
looks like this:Note: The deployment will also not working, when i remove the config file
When i run
exoframe -vvv
in mysapper project
i will get this result:My Server:
When i run
exoframe logs exoframe-server
i will get this output:How can i solve this issue? Note: it seems all deployment templates do not work, not only nodejs projects