Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit db89993

Browse filesBrowse files
committed
Add script for deploying in dev via docker-compose
1 parent 88243ee commit db89993
Copy full SHA for db89993

File tree

Expand file treeCollapse file tree

3 files changed

+49
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+49
-0
lines changed
Open diff view settings
Collapse file

‎bin/build-dev‎

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
4+
docker build --rm -t pythonph/pythonph .
5+
COMPOSE="docker-compose -f docker-compose-dev.yml"
6+
$COMPOSE build nginx
7+
$COMPOSE up -d source
8+
$COMPOSE logs source
Collapse file

‎bin/deploy-dev‎

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
set -e
3+
4+
COMPOSE="docker-compose -f docker-compose-dev.yml"
5+
$COMPOSE up -d --force-recreate web nginx db
Collapse file

‎docker-compose-dev.yml‎

Copy file name to clipboard
+36Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
source:
2+
image: pythonph/pythonph
3+
volumes:
4+
- /usr/src/app/venv
5+
- /usr/src/app/node_modules
6+
- /usr/src/app/bower_components
7+
- /usr/src/app/static
8+
environment:
9+
- ENV=DEV
10+
env_file: dev.env
11+
command: bin/install
12+
13+
db:
14+
image: postgres:latest
15+
environment:
16+
- ENV=DEV
17+
env_file: dev.env
18+
19+
web:
20+
image: pythonph/pythonph
21+
volumes_from:
22+
- source
23+
environment:
24+
- ENV=DEV
25+
env_file: dev.env
26+
links:
27+
- db:db
28+
command: gunicorn -b 0.0.0.0:8000 --access-logfile - --error-logfile - pythonph.wsgi
29+
30+
nginx:
31+
build: nginx
32+
ports:
33+
- 8080:80
34+
- 443:443
35+
links:
36+
- web:web

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.