-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (24 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Orbiter8 BobaBeam Bridge Demo image builder. JS client in /var/www/client, EVM code in /evm
# Only /var/www/client has `composer/npm istall` run against it.
# Build Stage 1: NPM Install to generate assets
# Latest Node.js LTS version as of 2022.03.22: 16.14.2
FROM node:17.9-alpine AS node_npm
WORKDIR /var/www/client
COPY ./client /var/www/client
# The JS Client requires ABI and address JSON artifacts for the EVM Contracts
# TODO: After EVM integration to client, once whitelisted with Boba
COPY ./evm/artifacts/contracts/MultiverseShip.sol /var/www/evm/artifacts/contracts/MultivereShip.sol/MultivereShip.json
COPY ./evm/artifacts/contracts/MultiverseShip.L1.sol /var/www/evm/artifacts/contracts/MultivereShip.sol/MultiverseShip.L1.sol
COPY ./evm/artifacts/contracts/MultiverseShip.L2.sol /var/www/evm/artifacts/contracts/MultivereShip.sol/MultivereShip.L2.json
COPY ./evm/addresses/published-addresses.json /var/www/evm/addresses/published-addresses.json
# Vite Build
RUN npm config set depth 0 && \
npx vite build --outDir /var/www/client/public && \
rm -rf node_modules
# Build Stage 3: Final image, without unneeded components
# Base image from https://github.com/Partavate-Studios/nginx-php-fpm
FROM registry.gitlab.com/partavate/infrastructure/nginx-php-fpm:php81
COPY ./deployment/nginx.conf /etc/nginx/conf.d/Bobabeam-dema.conf
RUN rm -rf /etc/nginx/conf.d/default.conf
# Copy Assets to the final image
COPY --from=node_npm /var/www/client/public /var/www/client/public