Taloth / Aoe4bot

3 stars 3 forks source link

Need deployment documentation #7

Open Taloth opened 2 years ago

Taloth commented 2 years ago

@orientalsniper asked for how to deploy to vercel. But I dunno what format vercel requires to recognize it as a vanilla nodejs app.

Atm I deploy it manually to a kubernetes cluster as docker container. With Dockerfile:

FROM node:15

WORKDIR /usr/src/app

COPY package.json ./

RUN npm install

ENV PORT=8080
COPY index.js ./
COPY aoe4/ ./aoe4/
COPY views/ ./views/

RUN ls -al

EXPOSE 8080
CMD [ "node", "index.js" ]

Regardless, we should probably have some instructions on how to build and run it locally:

yarn install
yarn start

and some instructions on how to deploy.

MazGrasl commented 2 years ago

Vercel is mainly used for Next.js projects, I don't believe it's suited for node.js/express apps. Heroku seems to be a better solution for free hosting.

npm install and npm start work just as well too

Taloth commented 2 years ago

Vercel is mainly used for Next.js projects, I don't believe it's suited for node.js/express apps.

That's what I suspected. Heroku needs an app.json file in the root iirc. Very simple. We can add that to the repo, given that reneklacan offered to host it on their account or kube cluster. For that to happen we need a good 1.0 version, clean it up and get the sources to aoe4world github account. they can add us as collaborators. In the meanwhile just add app.json and host it ourselves till we're happy with the codebase and did a security check to make sure there's no query params ppl can mess with or other exploits.

What I'd like to see is ppl able to self-host for dev/test purposes and then have an official version on aoe4world.com or a subdomain there.

And yeah, npm will work too.

Taloth commented 2 years ago

Added app.json and Dockerfile. It's the last I can do till after vacation.