-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
186 lines (180 loc) · 5.01 KB
/
docker-compose.yml
File metadata and controls
186 lines (180 loc) · 5.01 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
volumes:
db-data:
nm-app:
storage-data:
gantry-node-modules:
services:
app:
build:
dockerfile: Dockerfile
context: .
args:
BUILD_ENV: $(BUILD_ENV)
command: ['npm', 'run', 'dev']
stdin_open: true
tty: true
volumes:
- .:/app
- nm-app:/app/node_modules
ports:
- '3000:3000'
depends_on:
db:
condition: service_healthy
storage:
condition: service_healthy
uaa:
condition: service_started
environment:
BUILD_ENV: $(BUILD_ENV)
DATABASE_URI: postgresql://postgres:password@db:5432/pages_editor
PAYLOAD_SECRET: mysecret
NEXT_PUBLIC_SERVER_URL: http://localhost:3000
PREVIEW_URL: http://localhost:4561
OAUTH_CLIENT_ID: pages-client
OAUTH_CLIENT_SECRET: client-secret
OAUTH_AUTH_ENDPOINT: http://localhost:9001/oauth/authorize
OAUTH_TOKEN_ENDPOINT: http://uaa:8080/oauth/token
OAUTH_USERINFO_ENDPOINT: http://uaa:8080/userinfo
LOGOUT_ENDPOINT: http://uaa:8080/logout.do
PUBLIC_URL: http://localhost:3000
PROMPT_URL: http://localhost:5000/reload
TEST_DATABASE_URI: postgresql://postgres:password@db:5432/pages_editor_test
STORAGE_ENDPOINT_URL: http://storage:9000
STORAGE_FORCE_PATH_STYLE: true
SITE_METADATA_BUCKET: pages-editor-bucket
AWS_ACCESS_KEY_ID: pages-editor-access-key
AWS_SECRET_ACCESS_KEY: pages-editor-secret-key
AWS_REGION: us-gov-west-1
BUCKET_MANAGER_AWS_ACCESS_KEY_ID: pages-editor-access-key
BUCKET_MANAGER_AWS_SECRET_ACCESS_KEY: pages-editor-secret-key
healthcheck:
test: ['CMD', 'curl', '-F', 'http://localhost:3000']
interval: 10s
timeout: 5s
retries: 5
db:
build:
dockerfile: Dockerfile-db
context: ./docker
volumes:
- db-data:/var/lib/postgresql/data
ports:
- '5433:5432'
environment:
POSTGRES_DB: pages_editor
POSTGRES_TEST_DB: pages_editor_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
user: postgres
healthcheck:
test: ['CMD-SHELL', 'pg_isready', '-h', 'db', '-d', 'pages_editor']
interval: 10s
timeout: 5s
retries: 5
storage:
image: minio/minio
ports:
- '9100:9000'
- '9101:9001'
healthcheck:
test: ['CMD', 'curl', '-I', http://storage:9000/minio/health/live]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
command: 'server --console-address=":9001" /data'
environment:
MINIO_ROOT_USER: pages-editor-access-key
MINIO_ROOT_PASSWORD: pages-editor-secret-key
MINIO_ENDPOINT_URL: http://storage:9000
volumes:
- storage-data:/data
- .:/app
storage-bootstrap:
image: minio/mc
depends_on:
storage:
condition: service_healthy
restart: 'no'
environment:
MINIO_ROOT_USER: pages-editor-access-key
MINIO_ROOT_PASSWORD: pages-editor-secret-key
MINIO_ENDPOINT_URL: http://storage:9000
BUCKET_NAME: pages-editor-bucket
SITES_SERVICE_NAMES: pages-editor-bucket,pages-site1-bucket,pages-site2-bucket
entrypoint: /app/docker/minio-bootstrap.sh
volumes:
- .:/app
uaa:
build:
dockerfile: Dockerfile-uaa
context: ./docker
ports:
- 9001:8080
command: ['/tomcat/bin/catalina.sh', 'run']
site1:
build:
dockerfile: Dockerfile-pages-site-gantry
context: ./docker
args: &site_gantry_args # Update this tag to test with a different version of the site gantry
SITE_GANTRY_TAG: '0.3.0'
command: ['npm', 'run', 'dev']
ports:
- 4561:4321
environment:
BASEURL: '/'
EDITOR_APP_URL: http://app:3000
OAUTH_CLIENT_ID:
OAUTH_CLIENT_SECRET:
NODE_ENV: development
PAYLOAD_API_KEY: 'df301adb-6d26-4688-bd17-9454a2da62bd'
PAYLOAD_SECRET: mysecret
RENDER_MODE: 'server'
PREVIEW_MODE: true
LOCAL_DEV: true
PAGE_SIZE: 10
depends_on:
app:
condition: service_started
db:
condition: service_healthy
storage:
condition: service_healthy
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4321']
interval: 10s
timeout: 5s
retries: 5
site2:
build:
dockerfile: Dockerfile-pages-site-gantry
context: ./docker
args: *site_gantry_args
command: ['npm', 'run', 'dev']
ports:
- 4562:4321
environment:
BASEURL: '/'
EDITOR_APP_URL: http://app:3000
OAUTH_CLIENT_ID:
OAUTH_CLIENT_SECRET:
NODE_ENV: development
PAYLOAD_API_KEY: 'a6f81491-939b-456c-980a-4e0fb7461edf'
PAYLOAD_SECRET: mysecret
RENDER_MODE: 'server'
PREVIEW_MODE: true
LOCAL_DEV: true
PAGE_SIZE: 10
depends_on:
app:
condition: service_started
db:
condition: service_healthy
storage:
condition: service_healthy
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4321']
interval: 10s
timeout: 5s
retries: 5