Skip to content

Commit 9c1cd75

Browse files
committed
WIP: Development docker file
1 parent ec250b2 commit 9c1cd75

File tree

4 files changed

+61
-2
lines changed

4 files changed

+61
-2
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
docker

Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
FROM ubuntu:trusty
2+
MAINTAINER EverythingMe Geeks <opensource@everything.me>
3+
LABEL description="Development image for the redshift-console project"
4+
5+
RUN apt-get update && apt-get install -y --force-yes --no-install-recommends\
6+
apt-transport-https \
7+
build-essential \
8+
curl \
9+
ca-certificates \
10+
git \
11+
lsb-release \
12+
python-all \
13+
python-dev \
14+
python-pip \
15+
libpq-dev \
16+
rlwrap \
17+
&& rm -rf /var/lib/apt/lists/*;
18+
19+
RUN curl https://deb.nodesource.com/node_0.12/pool/main/n/nodejs/nodejs_0.12.7-1nodesource1~trusty1_amd64.deb > node.deb \
20+
&& dpkg -i node.deb \
21+
&& rm node.deb
22+
23+
RUN npm install -g pangyp\
24+
&& ln -s $(which pangyp) $(dirname $(which pangyp))/node-gyp\
25+
&& npm cache clear\
26+
&& node-gyp configure || echo ""
27+
28+
# Allow running bower as root user
29+
RUN echo '{ "allow_root": true }' > /root/.bowerrc
30+
31+
COPY requirements.txt /app/requirements.txt
32+
COPY package.json /app/package.json
33+
COPY .bowerrc /app/.bowerrc
34+
COPY redshift_console/static/bower.json /app/redshift_console/static/bower.json
35+
36+
WORKDIR /app
37+
RUN npm install -g gulp bower
38+
RUN npm install
39+
RUN bower install
40+
RUN pip install -r requirements.txt
41+
42+
RUN echo 'api: python -m redshift_console runserver --debug\nfe: gulp watch' > /app/Procfile
43+
RUN pip install honcho
44+
45+
VOLUME /app
46+
47+
# API server
48+
EXPOSE 5000
49+
# Frontend server
50+
EXPOSE 3000
51+
52+
ENTRYPOINT ["honcho"]
53+
CMD ["start"]

Procfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
api: python -m redshift_console runserver --debug
2+
fe: gulp watch

gulpfile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,12 @@ gulp.task('extras', function () {
129129
// Watch
130130
gulp.task('watch', ['html', 'bundle'], function () {
131131
var port = process.env['PORT'] || 9001;
132-
132+
133133
browserSync({
134134
notify: false,
135135
logPrefix: 'BS',
136-
proxy: 'http://localhost:'+port+'/'
136+
proxy: 'http://localhost:'+port+'/',
137+
open: false
137138
});
138139

139140
gulp.watch('app/scripts/**/*.js', ['scripts', reload]);

0 commit comments

Comments
 (0)