forked from ledwards/shipyard-template-flask
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
52 lines (46 loc) · 1.13 KB
/
docker-compose.yaml
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
48
49
50
51
52
version: '3'
services:
web:
labels:
shipyard.route: '/'
build: '.'
environment:
DATABASE_URL: 'postgres://obscure-user:obscure-password@postgres/app'
DEV: ${DEV}
FLASK_DEBUG: '1'
volumes:
- './filesystem/entrypoints:/entrypoints:ro'
- './migrations:/srv/migrations'
- './src:/srv/src:ro'
ports:
- '8080:8080'
worker:
labels:
shipyard.before: 'poetry run flask db upgrade'
build: '.'
environment:
DATABASE_URL: 'postgres://obscure-user:obscure-password@postgres/app'
DEV: ${DEV}
FLASK_DEBUG: '1'
command: '/entrypoints/worker.sh'
volumes:
- './filesystem/entrypoints:/entrypoints:ro'
- './migrations:/srv/migrations'
- './src:/srv/src:ro'
postgres:
image: 'postgres:9.6-alpine'
environment:
POSTGRES_USER: 'obscure-user'
POSTGRES_PASSWORD: 'obscure-password'
POSTGRES_DB: 'app'
PGDATA: '/var/lib/postgresql/data/pgdata'
volumes:
- 'postgres:/var/lib/postgresql/data'
ports:
- '5432'
redis:
image: 'redis:5.0-alpine'
ports:
- '6379'
volumes:
postgres: