jaehyuk-jang

Add dockerfile

1 +node_modules
...\ No newline at end of file ...\ No newline at end of file
1 +FROM ubuntu:18.04
2 +RUN apt-get update
3 +ENV NODE_VERSION=14.15.0
4 +RUN apt install -y curl
5 +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
6 +ENV NVM_DIR=/root/.nvm
7 +RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
8 +RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
9 +RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
10 +ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
11 +RUN node --version
12 +RUN npm --version
13 +RUN npm install -g yarn
14 +RUN apt-get install -y git
15 +RUN mkdir /app
16 +RUN git clone http://khuhub.khu.ac.kr/2021-1-capstone-design2/2015104215 /app
17 +RUN cd /app/project;yarn install
18 +RUN cd /app/project;yarn build:api
19 +EXPOSE 5000
20 +WORKDIR /app/project
21 +CMD [ "yarn", "start:api" ]
...\ No newline at end of file ...\ No newline at end of file
1 +FROM ubuntu:18.04
2 +RUN apt-get update
3 +ENV NODE_VERSION=14.15.0
4 +RUN apt install -y curl
5 +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
6 +ENV NVM_DIR=/root/.nvm
7 +RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
8 +RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
9 +RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
10 +ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
11 +RUN node --version
12 +RUN npm --version
13 +RUN npm install -g yarn
14 +RUN apt-get install -y git
15 +RUN mkdir /app
16 +RUN git clone http://khuhub.khu.ac.kr/2021-1-capstone-design2/2015104215 /app
17 +RUN cd /app/project;yarn install
18 +RUN cd /app/project;yarn build:web
19 +EXPOSE 3000
20 +WORKDIR /app/project
21 +CMD [ "yarn", "start:web" ]
...\ No newline at end of file ...\ No newline at end of file
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
9 "build:api" : "lerna exec --scope @graphql-community/api --stream yarn build", 9 "build:api" : "lerna exec --scope @graphql-community/api --stream yarn build",
10 "build:web": "lerna exec --scope @graphql-community/api --stream yarn build", 10 "build:web": "lerna exec --scope @graphql-community/api --stream yarn build",
11 "dev:web": "lerna exec --scope @graphql-community/web --stream yarn dev", 11 "dev:web": "lerna exec --scope @graphql-community/web --stream yarn dev",
12 - "dev:api": "lerna exec --scope @graphql-community/api --stream yarn start:dev" 12 + "dev:api": "lerna exec --scope @graphql-community/api --stream yarn start:dev",
13 + "start:web": "lerna exec --scope @graphql-community/web --stream yarn start",
14 + "start:api": "lerna exec --scope @graphql-community/api --stream yarn start:prod"
13 }, 15 },
14 "workspaces": [ 16 "workspaces": [
15 "packages/**" 17 "packages/**"
......