forked from hackmdio/codimd
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from asdfg0280/docker/standalone
add Dockerfile
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM node:boron | ||
|
||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ | ||
wget -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - && \ | ||
apt-get update && \ | ||
apt-get install -y git postgresql-client-9.6 | ||
|
||
#make directory | ||
RUN mkdir /hackadoc | ||
WORKDIR /hackadoc | ||
|
||
# file moving | ||
ADD . . | ||
# rename examples | ||
RUN mv .sequelizerc.example .sequelizerc | ||
RUN mv config.json.example config.json | ||
|
||
# npm install | ||
RUN npm install | ||
# npm build | ||
RUN npm run build | ||
|
||
# npm dev dependencies | ||
RUN npm prune --production | ||
|
||
# remove build dependencies | ||
RUN apt-get remove -y --auto-remove build-essential && \ | ||
apt-get clean && apt-get purge && rm -r /var/lib/apt/lists/* | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["node", "app.js"] |