generated from api-platform/api-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-deps.sh
executable file
·24 lines (18 loc) · 1012 Bytes
/
update-deps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Update Docker images
docker-compose pull
docker-compose build
# Update deps
docker-compose run php composer update
docker-compose run pwa /bin/sh -c 'yarn install && yarn upgrade'
# Update the Symfony skeleton
cd api
composer sync-recipes --force
# Hint the user to change APP_SECRET
sed -i.bak 's/^APP_SECRET=.*$/APP_SECRET=!ChangeMe!/' .env
# Compatibility with our Docker and Kubernetes setup
sed -i.bak 's;^DATABASE_URL="postgresql://db_user:[email protected]:5432/db_name?serverVersion=13\&charset=utf8"$;DATABASE_URL="postgresql://api-platform:!ChangeMe!@database:5432/api?serverVersion=13\&charset=utf8";' .env
sed -i.bak 's;^MERCURE_URL=https://127.0.0.1:8000/.well-known/mercure$;MERCURE_URL=http://caddy/.well-known/mercure;' .env
sed -i.bak 's;^MERCURE_PUBLIC_URL=https://127.0.0.1:8000/.well-known/mercure$;MERCURE_PUBLIC_URL=https://127.0.0.1/.well-known/mercure;' .env
rm .env.bak
echo 'Run `docker-compose up --build --force-recreate` now and check that everything is fine!'