| 
									
										
										
										
											2020-06-08 13:37:14 -07:00
										 |  |  | # This "container" is a workaround to pre-create search indices
 | 
					
						
							| 
									
										
										
										
											2021-02-24 16:00:16 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Defining environment
 | 
					
						
							|  |  |  | ARG APP_ENV=prod | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FROM jwilder/dockerize:0.6.1 AS base
 | 
					
						
							| 
									
										
										
										
											2019-09-12 19:04:29 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-02 20:49:34 -08:00
										 |  |  | RUN apk add --no-cache curl jq
 | 
					
						
							| 
									
										
										
										
											2019-09-12 19:04:29 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-24 16:00:16 -08:00
										 |  |  | FROM base AS prod-install
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-12-02 20:49:34 -08:00
										 |  |  | COPY docker/elasticsearch-setup/create-indices.sh /
 | 
					
						
							|  |  |  | RUN chmod 755 create-indices.sh
 | 
					
						
							| 
									
										
										
										
											2021-02-24 16:00:16 -08:00
										 |  |  | COPY gms/impl/src/main/resources/index /index
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FROM base AS dev-install
 | 
					
						
							|  |  |  | # Dummy stage for development. Use local files for setup
 | 
					
						
							|  |  |  | # See this excellent thread https://github.com/docker/cli/issues/1134
 | 
					
						
							| 
									
										
										
										
											2019-09-12 19:04:29 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-24 16:00:16 -08:00
										 |  |  | FROM ${APP_ENV}-install AS final
 | 
					
						
							| 
									
										
										
										
											2021-03-28 06:21:10 +03:00
										 |  |  | CMD if [ "$ELASTICSEARCH_USE_SSL" == "true" ]; then ELASTICSEARCH_PROTOCOL=https; else ELASTICSEARCH_PROTOCOL=http; fi \
 | 
					
						
							|  |  |  |     && if [[ -n "$ELASTICSEARCH_USERNAME" ]]; then ELASTICSEARCH_URL=$ELASTICSEARCH_USERNAME:$ELASTICSEARCH_PASSWORD@$ELASTICSEARCH_HOST; else ELASTICSEARCH_URL=$ELASTICSEARCH_HOST; fi \
 | 
					
						
							|  |  |  |     && dockerize -wait $ELASTICSEARCH_PROTOCOL://$ELASTICSEARCH_URL:$ELASTICSEARCH_PORT -timeout 120s /create-indices.sh
 |