...
 
Commits (2)
......@@ -6,6 +6,7 @@ services:
stages:
- build
- test
- prepare
- deploy
cache:
......@@ -35,14 +36,32 @@ test:
- docker-php-ext-install gd
- bin/phpspec run
prepare:fpm:
stage: prepare
image: minds/ci:latest
script:
- $(aws ecr get-login --no-include-email --region us-east-1)
- docker build -t $REPOSITORY_URL_FPM-$CI_BUILD_REF -f containers/php-fpm/Dockerfile .
- docker push $REPOSITORY_URL_FPM-$CI_BUILD_REF
environment:
name: staging
prepare:runners:
stage: prepare
image: minds/ci:latest
script:
- $(aws ecr get-login --no-include-email --region us-east-1)
- docker build -t $REPOSITORY_URL_RUNNERS-$CI_BUILD_REF -f containers/php-runners/Dockerfile .
- docker push $REPOSITORY_URL_RUNNERS-$CI_BUILD_REF
environment:
name: staging
deploy:fpm:
stage: deploy
image: docker:latest
image: minds/ci:latest
script:
- apk add --no-cache curl jq python py-pip
- pip install awscli
- docker build -t $REPOSITORY_URL_FPM -f containers/php-fpm/Dockerfile .
- $(aws ecr get-login --no-include-email --region us-east-1)
- docker tag $REPOSITORY_URL_FPM-$CI_BUILD_REF $REPOSITORY_URL_FPM
- docker push $REPOSITORY_URL_FPM
- aws ecs update-service --service=$SERVICE_FPM --force-new-deployment --region us-east-1 --cluster=$CLUSTER
only:
......@@ -54,12 +73,10 @@ deploy:fpm:
deploy:runners:
stage: deploy
image: docker:latest
image: minds/ci:latest
script:
- apk add --no-cache curl jq python py-pip
- pip install awscli
- docker build -t $REPOSITORY_URL_RUNNERS -f containers/php-runners/Dockerfile .
- $(aws ecr get-login --no-include-email --region us-east-1)
- docker tag $REPOSITORY_URL_RUNNERS-$CI_BUILD_REF $REPOSITORY_URL_RUNNERS
- docker push $REPOSITORY_URL_RUNNERS
- aws ecs update-service --service=$SERVICE_RUNNERS --force-new-deployment --region us-east-1 --cluster=$CLUSTER
only:
......@@ -67,4 +84,4 @@ deploy:runners:
- master
- test/gitlab-ci
environment:
name: production
\ No newline at end of file
name: production
......@@ -13,10 +13,6 @@ ADD --chown=www-data . /var/www/Minds/engine
RUN rm -f /var/www/Minds/engine/settings.php
# Install awscli
RUN apk update && apk add --no-cache py-pip && pip install --upgrade pip && pip install awscli
# Copy secrets script
COPY containers/php-fpm/pull-secrets.sh pull-secrets.sh
......
......@@ -8,10 +8,6 @@ ADD --chown=www-data . /var/www/Minds/engine
RUN rm -f /var/www/Minds/engine/settings.php
# Install awscli
RUN apk update && apk add --no-cache py-pip && pip install --upgrade pip && pip install awscli
# Setup our supervisor service
RUN apk add --no-cache \
......
......@@ -8,10 +8,6 @@ ADD --chown=www-data . /var/www/Minds/engine
RUN rm -f /var/www/Minds/engine/settings.php
# Install awscli
RUN apk update && apk add --no-cache py-pip && pip install --upgrade pip && pip install awscli
# Setup our supervisor service
RUN apk add --no-cache \
......
......@@ -84,6 +84,10 @@ RUN apk add --update --no-cache nodejs
RUN apk add --no-cache ffmpeg
# Install awscli
RUN apk update && apk add --no-cache py-pip && pip install --upgrade pip && pip install awscli
# PHP INI
COPY php.ini /usr/local/etc/php/
......
......@@ -8,10 +8,6 @@ ADD --chown=www-data . /var/www/Minds/engine
RUN rm -f /var/www/Minds/engine/settings.php
# Install awscli
RUN apk update && apk add --no-cache py-pip && pip install --upgrade pip && pip install awscli
# Setup our supervisor service
RUN apk add --no-cache \
......