-
Notifications
You must be signed in to change notification settings - Fork 43
/
docker-compose.yml
96 lines (89 loc) · 2.45 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: '3.4'
services:
db:
# https://hub.docker.com/_/postgres
image: postgres:12.6-alpine@sha256:b5c57d326a4cb8cf2fd5cdedc758ed72146a69304ae434b177088b94a7c9e6b8
expose:
- "5432"
ports:
- "127.0.0.1:5432:5432"
volumes:
- ./backend-project/contrib/docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro
# /var/lib/postgresql/data
environment:
POSTGRES_USER: 'user'
POSTGRES_PASSWORD: 'pass'
migration_db:
image: mysql:5.7@sha256:1a73b6a8f507639a8f91ed01ace28965f4f74bb62a9d9b9e7378d5f07fab79dc
environment:
MYSQL_ROOT_PASSWORD: 'pass'
MYSQL_ROOT_HOST: '%'
MYSQL_DATABASE: 'small_eod'
ports:
- "127.0.0.1:3306:3306"
expose:
- "3306"
volumes:
- ./backend-project/small_eod/migration_v1/sql_scripts:/docker-entrypoint-initdb.d:ro
backend:
build:
context: ./backend-project
target: dev
depends_on:
- db
- fake-oauth
volumes:
- ./backend-project:/code
- static:/code/static
- media:/code/media
- ./docs:/docs
environment:
DATABASE_URL: postgres://user:pass@db:5432/small_eod
MIGRATION_DATABASE_URL: mysql://root:pass@migration_db/small_eod
MINIO_ACCESS_KEY: test
MINIO_SECRET_KEY: test8chars
MINIO_URL: http://minio:9000
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY: "x-x.apps.googleusercontent.com"
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET: "x-puMp99EjG7"
# Fake oauth - set to True only for local development
SOCIAL_AUTH_USE_FAKE_OAUTH: "True"
# SECRET_KEY
# DJANGO_ALLOWED_HOSTS
expose:
- "8000"
frontend:
build:
context: ./frontend-project
environment:
COMMIT_SHA: '${COMMIT_SHA:-unknown_sha}'
COMMIT_BRANCH: '${COMMIT_BRANCH:-unknown_branch}'
volumes:
- ./frontend-project:/code
ports:
- "8000:8000"
expose:
- "8000"
minio:
# https://hub.docker.com/r/minio/minio/
image: minio/minio:RELEASE.2020-01-16T22-40-29Z@sha256:6ea470e8fa46b4f86230bd44fc6b7f1dd4f7ca04c5d710f98cdfeff7622a55d2
ports:
- "9000:9000"
expose:
- 9000
command: server /data
volumes:
- ./dev-data/minio:/data
environment:
MINIO_ACCESS_KEY: test
MINIO_SECRET_KEY: test8chars
# fake oauth server for local development *only*.
fake-oauth:
build:
context: ./fake-oauth
ports:
- "5678:5678"
expose:
- "5678"
volumes:
static:
media: