migration
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
a744fe8456
commit
180d6e4ee7
123
.drone.yml
123
.drone.yml
|
@ -3,106 +3,31 @@ type: docker
|
||||||
name: build
|
name: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: backend
|
- name: build-backend
|
||||||
image: composer:2.1.14
|
image: public.ecr.aws/composer/composer:latest
|
||||||
commands:
|
commands:
|
||||||
- cd backend && composer install && composer dump-autoload --classmap-authoritative && composer dump-env prod && rm -rf var/cache
|
- cd backend
|
||||||
|
- composer install
|
||||||
|
- composer dump-autoload --classmap-authoritative
|
||||||
|
- composer dump-env prod
|
||||||
|
- rm -rf var/cache
|
||||||
|
|
||||||
- name: frontend
|
- name: build-frontend
|
||||||
image: node:16.13.1-alpine
|
image: public.ecr.aws/docker/library/node:16.13.1-alpine
|
||||||
commands:
|
commands:
|
||||||
- cd frontend && npm install && REACT_APP_GIT_SHA="${DRONE_COMMIT_SHA:0:10}" npm run build
|
- cd frontend
|
||||||
volumes:
|
- npm install
|
||||||
- name: cache
|
- REACT_APP_GIT_SHA="${DRONE_COMMIT_SHA:0:10}" npm run build
|
||||||
path: /drone/src/frontend/node_modules
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /drone/src/frontend/node_modules
|
||||||
|
|
||||||
- name: build-php-image
|
- name: deploy-to-volume
|
||||||
image: plugins/docker
|
image: public.ecr.aws/docker/library/busybox:latest
|
||||||
settings:
|
commands:
|
||||||
dockerfile: docker/Dockerfile.php
|
- rm -rf /var/www-xrg.es/*
|
||||||
repo: registry.xrg.io/xrges/php
|
- mv backend /var/www-xrg.es/backend
|
||||||
registry: https://registry.xrg.io
|
- mv frontend/build /var/www-xrg.es/frontend
|
||||||
cache_from: registry.xrg.io/xrges/php:latest
|
|
||||||
auto_tag: true
|
|
||||||
username:
|
|
||||||
from_secret: registry_username
|
|
||||||
password:
|
|
||||||
from_secret: registry_password
|
|
||||||
depends_on:
|
|
||||||
- frontend
|
|
||||||
- backend
|
|
||||||
|
|
||||||
- name: build-nginx-image
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
dockerfile: docker/Dockerfile.nginx
|
|
||||||
repo: registry.xrg.io/xrges/nginx
|
|
||||||
registry: https://registry.xrg.io
|
|
||||||
cache_from: registry.xrg.io/xrges/nginx:latest
|
|
||||||
auto_tag: true
|
|
||||||
username:
|
|
||||||
from_secret: registry_username
|
|
||||||
password:
|
|
||||||
from_secret: registry_password
|
|
||||||
depends_on:
|
|
||||||
- frontend
|
|
||||||
- backend
|
|
||||||
|
|
||||||
- name: build-redis-image
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
dockerfile: docker/Dockerfile.redis
|
|
||||||
repo: registry.xrg.io/xrges/redis
|
|
||||||
registry: https://registry.xrg.io
|
|
||||||
cache_from: registry.xrg.io/xrges/redis:latest
|
|
||||||
auto_tag: true
|
|
||||||
username:
|
|
||||||
from_secret: registry_username
|
|
||||||
password:
|
|
||||||
from_secret: registry_password
|
|
||||||
depends_on:
|
|
||||||
- frontend
|
|
||||||
- backend
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: cache
|
|
||||||
host:
|
|
||||||
path: /tmp/drone/cache/node_modules
|
|
||||||
|
|
||||||
node:
|
node:
|
||||||
location: home
|
location: hub
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: deploy
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: run
|
|
||||||
image: docker/compose:1.29.2
|
|
||||||
environment:
|
|
||||||
username:
|
|
||||||
from_secret: registry_username
|
|
||||||
password:
|
|
||||||
from_secret: registry_password
|
|
||||||
commands:
|
|
||||||
- echo $username
|
|
||||||
- docker login -u $username -p $password https://registry.xrg.io
|
|
||||||
- docker-compose -f docker/docker-compose.prod.yml stop
|
|
||||||
#- docker-compose -f docker/docker-compose.prod.yml rm -f
|
|
||||||
- docker-compose -f docker/docker-compose.prod.yml pull
|
|
||||||
- docker-compose -f docker/docker-compose.prod.yml up -d
|
|
||||||
volumes:
|
|
||||||
- name: host_docker_sock
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: host_docker_sock
|
|
||||||
host:
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
|
|
||||||
node:
|
|
||||||
location: do1
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- build
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
|
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
|
||||||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
||||||
|
|
||||||
REDIS_HOST=xrges-redis
|
REDIS_HOST=redis
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
###> symfony/framework-bundle ###
|
###> symfony/framework-bundle ###
|
||||||
|
|
Loading…
Reference in New Issue