-
Notifications
You must be signed in to change notification settings - Fork 1
/
dockerfile
49 lines (30 loc) · 974 Bytes
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Use an official Node.js Alpine Linux runtime as a base image
FROM node:16-alpine
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy package.json and package-lock.json to the working directory
COPY package*.json ./
# Install app dependencies
RUN npm install
# Copy the application files to the working directory
COPY . .
# Expose the port on which your app runs
EXPOSE 3000
# RUN ./node_modules/.bin/truffle migrate --network dev
WORKDIR /usr/src/app/appfrontend
RUN npm install --production
# Install Truffle globally
# RUN npm install -g truffle
# Install Ganache globally
# RUN npm install -g ganache-cli
# Run Truffle migrations
# RUN npm run ganache &
# Change directory to appfrontend
# WORKDIR /usr/src/app/appfrontend
# Install dependencies for appfrontend
# RUN npm i
# WORKDIR /usr/src/app
# RUN ./node_modules/.bin/truffle migrate --network dev
# WORKDIR /usr/src/app/appfrontend
# Start appfrontend
CMD ["npm", "start"]