This website works better with JavaScript.
Home
Explore
Help
Sign In
jrtechs
/
jrtechs-NodeJSBlog
mirror of
https://github.com/jrtechs/NodeJSBlog.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
0
Wiki
Activity
Browse Source
created docker compose run script for node application
master
jrtechs
4 years ago
parent
0c2cc6d13e
commit
9ef6d51110
2 changed files
with
33 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+21
-0
Dockerfile
+12
-3
docker-compose.yml
+ 21
- 0
Dockerfile
View File
@ -0,0 +1,21 @@
# jeffery russell 12-17-2020
FROM
node:buster-slim
WORKDIR
/src/
# installs node dependencies
RUN
npm install
ADD
package.json package.json
# installs pandoc
RUN
apt-get update
&&
\
apt-get install pandoc -y
# exposes port application runs on
EXPOSE
8000
# launch command
CMD
npm start
+ 12
- 3
docker-compose.yml
View File
@ -10,7 +10,16 @@ services:
restart
:
always
environment:
MYSQL_ROOT_PASSWORD
:
password
ports:
-
"3306:3306"
volumes:
-
"./db:/var/lib/mysql"
-
"./db:/var/lib/mysql"
blog:
build
:
.
volumes:
-
./:/src
ports:
-
8000
:
8000
restart
:
always
links:
-
db:database
Write
Preview
Loading…
Cancel
Save