[ci] tweak postgres setup
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Joe 2020-09-04 11:09:01 -05:00
parent 1d12a0c236
commit 2e6cd53c03
Signed by: joe
GPG Key ID: 8595A3F8F2CE1B74
1 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ steps:
pull: if-not-exists pull: if-not-exists
commands: commands:
- sleep 15 - sleep 15
- psql -U postgres -c "CREATE USER klip WITH PASSWORD 'klip' SUPERUSER;" - psql -U postgres -c "CREATE USER klip WITH PASSWORD 'klip' SUPERUSER;" -h postgres
- name: "setup redis" - name: "setup redis"
image: redis image: redis
@ -22,6 +22,7 @@ steps:
pull: if-not-exists pull: if-not-exists
commands: commands:
- cp .example.env .env - cp .example.env .env
- sed -i "/DB_HOST="127.0.0.1"/c\DB_HOST="postgres" .env
- sed -i "/DB_USER=/c\DB_USER=klip" .env - sed -i "/DB_USER=/c\DB_USER=klip" .env
- sed -i "/DB_PASSWORD=/c\DB_PASSWORD=klip" .env - sed -i "/DB_PASSWORD=/c\DB_PASSWORD=klip" .env
- sed -i "/REDIS_HOST="127.0.0.1"/c\REDIS_HOST="redis" .env - sed -i "/REDIS_HOST="127.0.0.1"/c\REDIS_HOST="redis" .env
@ -39,7 +40,7 @@ steps:
- npm run build - npm run build
services: services:
- name: database - name: postgres
image: postgres:10.14-alpine image: postgres:10.14-alpine
environment: environment:
POSTGRES_USER: postgres POSTGRES_USER: postgres