Browse Source

[ci] tweak postgres setup

develop
Joe 5 months ago
parent
commit
2e6cd53c03
Signed by: joe GPG Key ID: 8595A3F8F2CE1B74
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      .drone.yml

+ 3
- 2
.drone.yml View File

@ -11,7 +11,7 @@ steps:
pull: if-not-exists
commands:
- 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"
image: redis
@ -22,6 +22,7 @@ steps:
pull: if-not-exists
commands:
- 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_PASSWORD=/c\DB_PASSWORD=klip" .env
- sed -i "/REDIS_HOST="127.0.0.1"/c\REDIS_HOST="redis" .env
@ -39,7 +40,7 @@ steps:
- npm run build
services:
- name: database
- name: postgres
image: postgres:10.14-alpine
environment:
POSTGRES_USER: postgres


Loading…
Cancel
Save