Skip to content

Commit d860714

Browse files
committed
Docker compose for development workflow.
1 parent c5e9e02 commit d860714

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ build/*
99
.git/
1010
.mypy_cache/
1111
.python-version
12+
config.dev.yaml

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
config.dev.yaml
2+
13
# Byte-compiled / optimized / DLL files
24
__pycache__/
35
*.py[cod]

docker-compose.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
version: '3'
2+
3+
services:
4+
db:
5+
image: postgres
6+
environment:
7+
POSTGRES_USER: routemaster
8+
9+
serve:
10+
build: .
11+
image: routemaster:dev
12+
entrypoint:
13+
- routemaster
14+
- --config-file=config.dev.yaml
15+
- serve
16+
- --debug
17+
volumes:
18+
- .:/routemaster/app
19+
ports:
20+
- "2017:2017"
21+
working_dir: /routemaster/app
22+
environment:
23+
DB_NAME: routemaster
24+
DB_USER: routemaster
25+
DB_HOST: db
26+
DB_PORT: 5432
27+
depends_on:
28+
- db
29+
30+
migrate:
31+
build: .
32+
image: routemaster:migrations
33+
entrypoint:
34+
- alembic
35+
- upgrade
36+
- head
37+
volumes:
38+
- .:/routemaster/app
39+
working_dir: /routemaster/app
40+
environment:
41+
DB_NAME: routemaster
42+
DB_USER: routemaster
43+
DB_HOST: db
44+
DB_PORT: 5432
45+
depends_on:
46+
- db
47+
48+
validate:
49+
build: .
50+
image: routemaster:dev
51+
entrypoint:
52+
- routemaster
53+
- --config-file=config.dev.yaml
54+
- validate
55+
volumes:
56+
- .:/routemaster/app
57+
working_dir: /routemaster/app
58+
environment:
59+
DB_NAME: routemaster
60+
DB_USER: routemaster
61+
DB_HOST: db
62+
DB_PORT: 5432
63+
depends_on:
64+
- db

0 commit comments

Comments
 (0)