Re-implement Docker workflow using GitHub Actions (#326)
* Recreate a docker dir with all docker files inside and add init.sh * Add docker/README.md with example docker-compose.xml * Add mysql vars for mempool-config.json * Port can be set from env var in docker-compose.xml * Update docker-compose.xml example to use latest tag * Remove armv7 architecture from build workflow * Remove master git-hash file * Remove useless ':' in sed
This commit is contained in:
committed by
GitHub
parent
181cb8e03f
commit
20ff62779d
27
docker/backend/Dockerfile
Normal file
27
docker/backend/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM node:12-buster-slim AS builder
|
||||
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y build-essential python3 pkg-config
|
||||
RUN npm ci --production
|
||||
RUN npm i typescript
|
||||
RUN npm run build
|
||||
|
||||
FROM node:12-buster-slim
|
||||
|
||||
WORKDIR /backend
|
||||
|
||||
COPY --from=builder /build/ .
|
||||
|
||||
RUN chmod +x /backend/start.sh
|
||||
RUN chmod +x /backend/wait-for-it.sh
|
||||
|
||||
RUN chown -R 1000:1000 /backend && chmod -R 755 /backend
|
||||
|
||||
USER 1000
|
||||
|
||||
EXPOSE 8999
|
||||
|
||||
CMD ["/backend/start.sh"]
|
||||
Reference in New Issue
Block a user