dockerino

This commit is contained in:
Hion-V 2022-09-12 12:11:37 +02:00
parent 963d4d1750
commit 3bcb921032
2 changed files with 49 additions and 0 deletions

34
Dockerfile Normal file
View File

@ -0,0 +1,34 @@
FROM node:latest AS Build
RUN npm install haxe --global
RUN npm install lix --global --force
COPY ./api /app
WORKDIR /app
RUN lix scope
RUN lix download
RUN lix use haxe stable
# RUN lix install haxelib:hxnodejs
RUN haxe build.hxml
FROM node:latest
COPY --from=Build /app/build /app
COPY --from=Build /app/package.json /app/package.json
COPY --from=Build /app/res /app/res
WORKDIR /app/
RUN npm install
EXPOSE 8080
# CMD ["node", "out.js"]
CMD ["node", "out.js"]
# CMD ["/bin/bash"]

15
api/package.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "drivebyapi",
"version": "1.0.0",
"description": "api",
"main": "out.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"mysql": "^2.18.1",
"sqlite3": "^5.0.11"
}
}