File tree Expand file tree Collapse file tree 5 files changed +42
-3
lines changed Expand file tree Collapse file tree 5 files changed +42
-3
lines changed Original file line number Diff line number Diff line change 1919ENV DATABASE_URL=postgresql://rxp_user:secret@localhost:5432/rxp_db
2020
2121WORKDIR /app
22- CMD service postgresql start && \
23- python regexplanet-api.py
22+ CMD ./server.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # deploy the xregexp backend to zeit
4+ #
5+
6+ heroku container:push --app regexplanet-postgresql web
7+
8+
9+ # echo "INFO: listing existing versions"
10+ # now ls regexplanet-postgresql
11+
12+ # echo "INFO: deploying"
13+ # now && now alias
14+
15+ #
16+ # need to kill the old version!
17+ #
18+ # echo "INFO: removing the old version "
19+ # echo "WARNING: must be done manually with 'now rm'"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+
4+ docker build -t regexplanet-postgresql .
5+ docker run -p 4000:4000 --expose 4000 -e PORT=' 4000' regexplanet-postgresql
Original file line number Diff line number Diff line change @@ -303,4 +303,6 @@ def get(self):
303303
304304if __name__ == '__main__' :
305305 from paste import httpserver
306- httpserver .serve (app , host = '0.0.0.0' , port = '8080' )
306+ port = os .environ ['PORT' ] if 'PORT' in os .environ else '4000'
307+ sys .stdout .write ("INFO: starting on port %s\n " % port )
308+ httpserver .serve (app , host = '0.0.0.0' , port = port )
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # server startup for regexplanet-postgresql
4+ #
5+
6+ echo " INFO: started PostgreSQL..."
7+ service postgresql start
8+
9+ /usr/bin/python --version
10+
11+ echo " INFO: starting python API server..."
12+ /usr/bin/python regexplanet-api.py
13+
14+
You can’t perform that action at this time.
0 commit comments