Created
May 2, 2019 05:13
-
-
Save miukki/36586c05f4ab927ba1c431b8deae6d4a to your computer and use it in GitHub Desktop.
Docker container / deploy to EC2 nodejs/reactjs assets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
app: | |
container_name: app | |
restart: always | |
build: . | |
ports: | |
- "3000:3000" | |
links: | |
- mongo | |
mongo: | |
container_name: mongo | |
image: mongo | |
volumes: | |
- ./data:/data/db | |
ports: | |
- "27017:27017" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adm-client git:(feature/issues-70) docker-compose build | |
mongo uses an image, skipping | |
Building app | |
Step 1/9 : FROM node:10 | |
10: Pulling from library/node | |
e79bb959ec00: Downloading [=========================================> ] 37.67MB/45.34MB | |
d4b7902036fe: Download complete | |
1b2a72d4e030: Download complete | |
d54db43011fd: Downloading [===========================> ] 27.95MB/50.07MB | |
69d473365bb3: Downloading [=====> ] 23.58MB/215MB | |
6e2490ee2dc8: Waiting | |
6381e1b5feaa: Waiting | |
b1efb42c63e2: Waiting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
app: | |
container_name: app | |
restart: always | |
build: . | |
ports: | |
- "3000:3000" | |
links: | |
- mongo | |
mongo: | |
container_name: mongo | |
image: mongo | |
volumes: | |
- ./data:/data/db | |
ports: | |
- "27017:27017" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dockerfile config
FROM node:10
WORKDIR /usr/src/app
COPY . .
RUN yarn add pm2 -g
RUN yarn
RUN yarn prebuild
EXPOSE 3000
CMD [ "yarn", "docker" ]