diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f6694f3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,33 @@ +FROM node:latest AS Build + +RUN npm install haxe --global +RUN npm install lix --global --force +# RUN haxelib --global install hmm +# RUN haxelib --global run hmm setup + + +COPY ./app /app + +WORKDIR /app + +# RUN hmm install +RUN lix scope +RUN lix download +RUN lix use haxe stable +RUN lix install haxelib:hxnodejs +RUN lix install haxelib:haxe-loader +RUN lix install haxelib:react +RUN lix install haxelib:react-router-4 +# RUN lix install --global hmm +RUN yarn install + + + +WORKDIR /app/ + +EXPOSE 9000 +ENV NODE_OPTIONS="--openssl-legacy-provider" + + +CMD ["yarn", "start"] +# CMD ["/bin/bash"] \ No newline at end of file diff --git a/app/.haxerc b/app/.haxerc new file mode 100644 index 0000000..7140546 --- /dev/null +++ b/app/.haxerc @@ -0,0 +1,4 @@ +{ + "version": "4.2.5", + "resolveLibs": "scoped" +} \ No newline at end of file diff --git a/app/haxe_libraries/haxe-loader.hxml b/app/haxe_libraries/haxe-loader.hxml new file mode 100644 index 0000000..b308467 --- /dev/null +++ b/app/haxe_libraries/haxe-loader.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/haxe-loader#0.9.0" into haxe-loader/0.9.0/haxelib +-cp ${HAXE_LIBCACHE}/haxe-loader/0.9.0/haxelib/haxelib/ +-D haxe-loader=0.9.0 \ No newline at end of file diff --git a/app/haxe_libraries/history.hxml b/app/haxe_libraries/history.hxml new file mode 100644 index 0000000..e692d1f --- /dev/null +++ b/app/haxe_libraries/history.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/history#0.0.1" into history/0.0.1/haxelib +-cp ${HAXE_LIBCACHE}/history/0.0.1/haxelib/src +-D history=0.0.1 \ No newline at end of file diff --git a/app/haxe_libraries/html-entities.hxml b/app/haxe_libraries/html-entities.hxml new file mode 100644 index 0000000..b5a42cd --- /dev/null +++ b/app/haxe_libraries/html-entities.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/html-entities#1.0.0" into html-entities/1.0.0/haxelib +-cp ${HAXE_LIBCACHE}/html-entities/1.0.0/haxelib/src +-D html-entities=1.0.0 \ No newline at end of file diff --git a/app/haxe_libraries/hxnodejs.hxml b/app/haxe_libraries/hxnodejs.hxml new file mode 100644 index 0000000..577e96a --- /dev/null +++ b/app/haxe_libraries/hxnodejs.hxml @@ -0,0 +1,7 @@ +# @install: lix --silent download "haxelib:/hxnodejs#12.1.0" into hxnodejs/12.1.0/haxelib +-cp ${HAXE_LIBCACHE}/hxnodejs/12.1.0/haxelib/src +-D hxnodejs=12.1.0 +--macro allowPackage('sys') +# should behave like other target defines and not be defined in macro context +--macro define('nodejs') +--macro _internal.SuppressDeprecated.run() diff --git a/app/haxe_libraries/react-router-4.hxml b/app/haxe_libraries/react-router-4.hxml new file mode 100644 index 0000000..a682af4 --- /dev/null +++ b/app/haxe_libraries/react-router-4.hxml @@ -0,0 +1,6 @@ +# @install: lix --silent download "haxelib:/react-router-4#0.2.8" into react-router-4/0.2.8/haxelib +-lib history +-cp ${HAXE_LIBCACHE}/react-router-4/0.2.8/haxelib/src +-D react-router-4=0.2.8 +--macro react.router.bundle.Bundle.addHook() + diff --git a/app/haxe_libraries/react.hxml b/app/haxe_libraries/react.hxml new file mode 100644 index 0000000..c023002 --- /dev/null +++ b/app/haxe_libraries/react.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/react#1.12.0" into react/1.12.0/haxelib +-lib html-entities +-cp ${HAXE_LIBCACHE}/react/1.12.0/haxelib/src/lib +-D react=1.12.0 \ No newline at end of file