Skip to content

Commit

Permalink
Merge branch 'main' into mongodb-exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Cervello committed Nov 25, 2021
2 parents c76bac9 + 1f1ecc3 commit 74d6625
Show file tree
Hide file tree
Showing 937 changed files with 25,443 additions and 7,787 deletions.
22 changes: 18 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
DOCKER_CLIENT_TIMEOUT=120
COMPOSE_HTTP_TIMEOUT=120
# docker config
DOCKER_CLIENT_TIMEOUT=320
COMPOSE_HTTP_TIMEOUT=320
COMPOSE_PROJECT_NAME=po
COMPOSE_PATH_SEPARATOR=;
COMPOSE_FILE=docker-compose.yml;docker/dev.yml

# exposition of product opener, leave blank to expose on all ports
# ends with ":"
PRODUCT_OPENER_EXPOSE=127.0.0.1:
# same but for all admin tools
ADMIN_EXPOSE=127.0.0.1:

# version for backend and frontend images
TAG=latest
WWW_DATA_HOST_USER=${UID}
# setting to align host user to internal user
USER_UID=1000
USER_GID=1000

# env vars
PRODUCERS_PLATFORM=0
PRODUCT_OPENER_DOMAIN=openfoodfacts.localhost
PRODUCT_OPENER_PORT=80
Expand All @@ -17,11 +29,13 @@ MONGODB_HOST=mongodb
MONGODB_CACHE_SIZE=8 # GB
MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=test
ROBOTOFF_URL=robotoff.openfoodfacts.localhost
ROBOTOFF_URL=http://host.docker.internal:5500 # connect to Robotoff running in separate docker-compose deployment
GOOGLE_CLOUD_VISION_API_KEY=
CROWDIN_PROJECT_IDENTIFIER=
CROWDIN_PROJECT_KEY=
GEOLITE2_PATH=
GEOLITE2_LICENSE_KEY=
GEOLITE2_ACCOUNT_ID=
ELASTICSEARCH_HOSTS=
LOG_LEVEL_ROOT=TRACE
LOG_LEVEL_MONGODB=TRACE
23 changes: 21 additions & 2 deletions .github/workflows/container-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ jobs:
echo "COMPOSE_PATH_SEPARATOR=;" >> .env
echo "COMPOSE_FILE=docker-compose.yml;docker/prod.yml;docker/geolite2.yml;docker/monitor.yml" >> .env
echo "PRODUCT_OPENER_EXPOSE=" >> .env
echo "ADMIN_EXPOSE=" >> .env
# Set App variables
echo "TAG=sha-${{ github.sha }}" >> .env
echo "PRODUCERS_PLATFORM=0" >> .env
Expand All @@ -111,6 +114,8 @@ jobs:
echo "GEOLITE2_PATH=${{ secrets.GEOLITE2_PATH }}" >> .env
echo "GEOLITE2_LICENSE_KEY=${{ secrets.GEOLITE2_LICENSE_KEY }}" >> .env
echo "GEOLITE2_ACCOUNT_ID=${{ secrets.GEOLITE2_ACCOUNT_ID }}" >> .env
echo "LOG_LEVEL_ROOT=ERROR" >> .env
echo "LOG_LEVEL_MONGODB=ERROR" >> .env
# Override domain name in nginx.conf
sed -i.bak "s/productopener.localhost/${{ secrets.PRODUCT_OPENER_DOMAIN }}/g" ./conf/nginx.conf
Expand All @@ -129,6 +134,20 @@ jobs:
cd ${{ matrix.env }}
make create_external_volumes
- name: init backend
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
proxy_host: ${{ secrets.PROXY_HOST }}
proxy_username: ${{ secrets.USERNAME }}
proxy_key: ${{ secrets.SSH_PRIVATE_KEY }}
script_stop: false
script: |
cd ${{ matrix.env }}
make init_backend
- name: Start services
uses: appleboy/ssh-action@master
with:
Expand All @@ -142,8 +161,8 @@ jobs:
script: |
cd ${{ matrix.env }}
make hdown
make build_lang
make up
make setup_incron
- name: Check services are up
uses: appleboy/ssh-action@master
Expand Down Expand Up @@ -175,7 +194,7 @@ jobs:
cd ${{ matrix.env }}
make prune
- uses: frankie567/grafana-annotation-action@v1.0.2
- uses: frankie567/grafana-annotation-action@v1.0.3
if: ${{ always() }}
with:
apiHost: https://grafana.openfoodfacts.org
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-per-language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Matrix
uses: crowdin/github-action@1.4.0
uses: crowdin/github-action@1.4.1
with:
upload_translations: false # default is false
download_translations: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: crowdin action
uses: crowdin/github-action@1.4.0
uses: crowdin/github-action@1.4.1
with:
upload_translations: false # default is false
# Use this option to upload translations for a single specified language
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Thumbs.db
.vstags

# Logs
logs/
debug/
Store.debug.txt
*.log
logs/modperl_error_log
nytprof*.out

# Local databases
Expand All @@ -36,6 +37,9 @@ html/js/dist
html/images/icons/dist
html/images/attributes/*.svg

# Images
html/images/products/*

# Don't store helm dependencies in our git repo
docker/productopener/charts
docker/logs
Expand Down
Loading

0 comments on commit 74d6625

Please sign in to comment.