Skip to content

Commit

Permalink
Using separate nginx conf for containerized build; using separate ins…
Browse files Browse the repository at this point in the history
…tance path env variable for local build
  • Loading branch information
monotasker committed Mar 20, 2024
1 parent 167c3ed commit ed3ffb7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions docker-compose.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ services:
file: docker-services.yml
service: frontend
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/conf.d:/etc/nginx/conf.d
- ./docker/nginx_containerized/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx_containerized/conf.d:/etc/nginx/conf.d
# - ./static:/opt/invenio/var/instance/static
- static_data:/opt/invenio/var/instance/static
# extra_hosts:
# - "host.docker.internal:host-gateway"
depends_on:
- web-ui
- web-api
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
file: docker-services.yml
service: frontend
volumes:
- ${INVENIO_INSTANCE_PATH}/static:/opt/invenio/var/instance/static
- ${INVENIO_LOCAL_INSTANCE_PATH}/static:/opt/invenio/var/instance/static
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
Expand Down
4 changes: 2 additions & 2 deletions kcr-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ fi
if [ -f ./.invenio.private ]; then
ip=$(sed '3!d' .invenio.private | sed -e "s/^instance_path = //")
last_line=$(tail -1 ./.env)
if [[ $last_line == "INVENIO_INSTANCE_PATH"* ]]; then
if [[ $last_line == "INVENIO_LOCAL_INSTANCE_PATH"* ]]; then
echo "deleting old instance path"
sed -i "" '$d' .env
fi
echo "adding instance path to .env file as ${ip}"
[ "$(tail -c1 ./.env)" = "" ] || echo >> ./.env
echo "INVENIO_INSTANCE_PATH=${ip}" >> ./.env
echo "INVENIO_LOCAL_INSTANCE_PATH=${ip}" >> ./.env
fi
if [ ! -d "logs" ]; then
mkdir logs
Expand Down

0 comments on commit ed3ffb7

Please sign in to comment.