You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- kind: pipeline
- name: klip
-
- trigger:
- branch:
- - develop
-
- steps:
- - name: "setup postgres"
- image: postgres:10.14-alpine
- pull: if-not-exists
- detach: true
- commands:
- - sleep 45
- - psql -U postgres -c "CREATE USER klip WITH PASSWORD 'klip' SUPERUSER;" -h postgres
-
- - name: "setup redis"
- image: redis
- pull: if-not-exists
- detach: true
- commands:
- - sleep 5
- - redis-cli -h redis ping
-
- - name: "configure .env"
- image: ubuntu
- pull: if-not-exists
- commands:
- - cp .example.env .env
- - sed -i 's/DB_HOST=localhost/DB_HOST=postgres/g' .env
- - sed -i 's/DB_USER=/DB_USER=klip/g' .env
- - sed -i 's/DB_PASSWORD=/DB_PASSWORD=klip/g' .env
- - sed -i 's/REDIS_HOST="127.0.0.1"/REDIS_HOST="redis"/g' .env
- - sed -i 's/DEFAULT_DOMAIN="localhost:3000"/DEFAULT_DOMAIN="0.0.0.0:3000"/g' .env
-
- - name: "install node dependencies"
- image: node
- pull: if-not-exists
- commands:
- - npm ci
-
- - name: "build"
- image: node
- pull: if-not-exists
- commands:
- - npm run build
-
- - name: "start"
- image: node
- pull: if-not-exists
- detach: true
- commands:
- - npm start
-
- - name: "check response"
- image: inutano/wget
- pull: if-not-exists
- commands:
- - sleep 90
- - wget --server-response http://start:3000/api/v2/health
-
- services:
- - name: postgres
- image: postgres:10.14-alpine
- environment:
- POSTGRES_USER: postgres
- POSTGRES_HOST_AUTH_METHOD: trust
-
- - name: redis
- image: redis
|