This repository was archived by the owner on Nov 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose-proxy.yml
More file actions
134 lines (123 loc) · 3.12 KB
/
docker-compose-proxy.yml
File metadata and controls
134 lines (123 loc) · 3.12 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.4'
x-environment: &common-environment
USE_DOCKER: "yes"
DJANGO_SETTINGS_MODULE: config.settings.local
DJANGO_SECRET_KEY: not_so_secret
DJANGO_DEFAULT_FILE_STORAGE: django.core.files.storage.FileSystemStorage
services:
lesson-api:
build:
context: ./lesson-api
dockerfile: ./docker/local/django/Dockerfile
image: lesson_api_local
depends_on:
- postgres-lesson
- redis-lesson
volumes:
- ./lesson-api:/app
environment:
<<: *common-environment
DJANGO_ADMIN_URL: admin/
PORT: 8000
HOST: 0.0.0.0
DJANGO_DEBUG: "True"
DATABASE_URL: postgres://debug:debug@postgres-lesson:5432/debug
REDIS_CACHE_URL: redis://redis:6379/0
CELERY_BROKER_URL: redis://redis:6379/1
ports:
- "8000:8000"
command: /start.sh
postgres-lesson:
image: postgres
environment:
POSTGRES_HOST: postgres-lesson
POSTGRES_PORT: 5432
POSTGRES_DB: debug
POSTGRES_USER: debug
POSTGRES_PASSWORD: debug
redis-lesson:
image: "redis:alpine"
ports:
- "6379:6379"
tests-api:
build:
context: ./tests-api
dockerfile: ./.dockerdev/Dockerfile
target: development
image: tests-api:1.0.0
tmpfs:
- /tmp
depends_on:
- "postgres-tests"
- "redis-tests"
volumes:
- ./tests-api:/app:cached
- rails_cache:/app/tmp/cache
- bundle:/usr/local/bundle
environment:
NODE_ENV: development
RAILS_ENV: ${RAILS_ENV:-development}
REDIS_URL: redis://redis:6379/
DATABASE_URL: postgres://postgres:postgres@postgres-tests:5432/tests_api
WEB_CONCURRENCY: 1
HISTFILE: /app/log/.bash_history
PSQL_HISTFILE: /app/log/.psql_history
EDITOR: vi
ports:
- "3000:3000"
command: /bin/bash -c "rails db:drop; setup; puma -C config/puma.rb"
postgres-tests:
image: postgres:11.1
volumes:
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- postgres-tests:/var/lib/postgresql/data
- ./log:/root/log:cached
environment:
PSQL_HISTFILE: /root/log/.psql_history
ports:
- 5432
redis-tests:
image: redis:3.2-alpine
volumes:
- redis-tests:/data
ports:
- 6379
auth-api:
build:
context: ./authentication-api
dockerfile: ./docker/local/django/Dockerfile
image: auth_api_local
depends_on:
- postgres-auth
- redis-auth
volumes:
- ./authentication-api:/app
environment:
<<: *common-environment
DJANGO_ADMIN_URL: admin/
PORT: 8080
HOST: 0.0.0.0
DJANGO_DEBUG: "True"
DATABASE_URL: postgres://debug:debug@postgres-auth:5432/debug
REDIS_CACHE_URL: redis://redis:6379/0
CELERY_BROKER_URL: redis://redis:6379/1
ports:
- "8080:8080"
command: /start.sh
postgres-auth:
image: postgres
environment:
POSTGRES_HOST: postgres-auth
POSTGRES_PORT: 5432
POSTGRES_DB: debug
POSTGRES_USER: debug
POSTGRES_PASSWORD: debug
redis-auth:
image: "redis:alpine"
ports:
- "6380:6379"
volumes:
postgres-tests:
redis-tests:
bundle:
rails_cache: