Skip to content

Commit

Permalink
Merge pull request #13 from victorjourne/fix/build-with-proxy
Browse files Browse the repository at this point in the history
Fix/build with proxy
  • Loading branch information
victorjourne authored Jul 3, 2020
2 parents bce3fbf + b256d70 commit 699f103
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ elasticsearch: network
i=`expr $$i - 1`; \
done;\
true)
${DC} -f ${DC_FILE}-elasticsearch-huge.yml up -d
${DC} -f ${DC_FILE}-elasticsearch-huge.yml up --build -d

elasticsearch-stop:
@echo docker-compose down elasticsearch
Expand Down Expand Up @@ -168,7 +168,7 @@ nginx: network
frontend-dev:
@echo docker-compose run ${APP} frontend #--build
@echo ${DATA_PATH}
@export EXEC_ENV=dev; ${DC} -f ${DC_FILE}-frontend.yml up -d #--build --force-recreate
@export EXEC_ENV=dev; ${DC} -f ${DC_FILE}-frontend.yml up -d --build --force-recreate
$(DC) -f ${DC_FILE}-frontend.yml exec -d frontend npm run dev:tailwindcss
frontend-exec:
$(DC) -f ${DC_FILE}-frontend.yml exec frontend sh
Expand All @@ -195,6 +195,6 @@ frontend-build-dist: ${FRONTEND}/$(FILE_FRONTEND_APP_VERSION) frontend-check-bui

dev: network frontend-stop frontend-dev

up: frontend-dev backend-dev elasticsearch nginx
up: network frontend-dev backend-dev elasticsearch nginx

down: frontend-dev-stop backend-dev-stop elasticsearch-stop nginx-stop
2 changes: 1 addition & 1 deletion backend/tests/iga/test_elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def test_blue_green():
put_alias(new_index, INDEX_NAME)
delete_alias(old_index, INDEX_NAME)
res = search(req, INDEX_NAME)
import pdb; pdb.set_trace()
#import pdb; pdb.set_trace()
# should be equal rather than in, but doesn't work with test_app.py. WHY??
assert [hits['_id'] for hits in res['hits']] in ['BF2014-09-13055+-+Problématique+foncière+aux+Antilles.pdf',
'BF2015-16-15003-fondation-louis-lépine.pdf',
Expand Down
1 change: 1 addition & 0 deletions docker-compose-elasticsearch-huge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
dockerfile: Dockerfile
args:
- http_proxy=${http_proxy}
- https_proxy=${http_proxy}
- ES_VERSION=${ES_VERSION}
environment:
- cluster.name=matchid-cluster
Expand Down
1 change: 1 addition & 0 deletions docker-compose-elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
dockerfile: Dockerfile
args:
- http_proxy=${http_proxy}
- https_proxy=${http_proxy}
- ES_VERSION=${ES_VERSION}
environment:
- cluster.name=matchid-cluster
Expand Down
22 changes: 21 additions & 1 deletion elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
ARG ES_VERSION

FROM docker.elastic.co/elasticsearch/elasticsearch:${ES_VERSION}

ADD elasticsearch.yml /usr/share/elasticsearch/config
RUN bin/elasticsearch-plugin install analysis-icu

### Plugins ###
# Cannot work with our proxy....
#RUN bin/elasticsearch-plugin install --verbose analysis-icu

# Download from zip
RUN yum install wget -y

# /analysis-icu
ARG ES_VERSION
RUN wget "https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-${ES_VERSION}.zip"
RUN mkdir -p plugins/analysis-icu
RUN unzip -d plugins/analysis-icu analysis-icu-${ES_VERSION}.zip

# /analysis-phonetic
ARG ES_VERSION
RUN wget "https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-phonetic/analysis-phonetic-${ES_VERSION}.zip"
RUN mkdir -p plugins/analysis-phonetic
RUN unzip -d plugins/analysis-phonetic analysis-phonetic-${ES_VERSION}.zip
10 changes: 9 additions & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
ARG PDFJS_VERSION


FROM node:12.2.0-alpine

ENV PDFJS_VERSION "$PDFJS_VERSION"

RUN apk update\
&& apk add ca-certificates wget\
&& update-ca-certificates

# For production, see https://github.com/mikenikles/sapper-on-cloud-run/blob/master/Dockerfile
WORKDIR /app
COPY . .
RUN npm install
EXPOSE 3000

# PDF VIEWER
# PSDF VIEWER
RUN wget "https://github.com/mozilla/pdf.js/releases/download/v2.3.200/pdfjs-2.3.200-dist.zip"
RUN mkdir -p public
RUN unzip -d public pdfjs-2.3.200-dist.zip
RUN rm pdfjs-2.3.200-dist.zip


# tailwindcss
RUN npm install tailwindcss postcss-cli --save-dev

Expand Down

0 comments on commit 699f103

Please sign in to comment.