-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (39 loc) · 1.08 KB
/
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
#
# jasongiedymin/ansible-ghost
# docker build -t jasongiedymin/ansible-ghost .
#
# Requires:
# jasongiedymin/ansible-nodejs
# https://github.com/AnsibleShipyard/ansible-nodejs
#
# Uses Playbooks:
# JasonGiedymin.ark-nodejs
#
FROM jasongiedymin/ansible-nodejs
MAINTAINER ansibleshipyard
# Working dir
ENV WORKDIR /tmp/build/ansible-ghost
ENV NODE_ENV production
# ADD
ADD docker $WORKDIR/docker
ADD tasks $WORKDIR/tasks
ADD tests $WORKDIR/tests
#ADD vars $WORKDIR/vars
ADD templates $WORKDIR/templates
#ADD handlers $WORKDIR/handlers
# Here we continue to use add because
# there are a limited number of RUNs
# allowed.
ADD docker/inventory /etc/ansible/hosts
ADD docker/playbook.yml $WORKDIR/playbook.yml
# Execute
RUN ansible-galaxy install JasonGiedymin.ark-nodejs
RUN ansible-playbook $WORKDIR/playbook.yml -c local -vvvv
# TODO: in debug mode, leave. Prod, cleanup
# Cleanup
# RUN rm -R $WORKDIR
EXPOSE 2368
# By default the playbook uses an init.d but since docker doesn't
# the default will be safely ignored. Instead we rely on the
# docker CMD
CMD ["node", "/nodejs-apps/nodejs_app.js"]