forked from hack4impact/flask-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (45 loc) · 1.32 KB
/
docker-compose.yml
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
version: '3.4'
services:
server:
build:
context: .
ports:
- '5000:5000'
volumes:
- './:/app'
environment:
# set environment variables
REDISTOGO_URL: http://redis:6379
DEV_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
TEST_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
worker:
build:
dockerfile: Dockerfile.worker
context: .
volumes:
- './:/app'
environment:
# set environment variables
REDISTOGO_URL: http://redis:6379
DEV_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
TEST_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
postgres:
image: postgres
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: example
POSTGRES_DB: mydatabase
volumes:
- db-data:/var/lib/postgresql/data
adminer:
image: adminer
restart: always
ports:
- 8080:8080
redis:
image:
redis:6-alpine
volumes:
db-data: