Skip to content

Instantly share code, notes, and snippets.

@f213 f213/circle-config.yml
Last active Oct 26, 2019

Embed
What would you like to do?
version: 2
defaults: &defaults
docker:
- image: circleci/python:3.6-stretch
environment:
- DATABASE_URL=postgres://root:@postgres:5432/circle_test
- CELERY_BACKEND=redis://redis:6379
- ELASTICSEARCH_HOST=http://elasticsearch:9200
jobs:
build-docker-image:
steps:
- attach_workspace:
at: .
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Store environment variables
command: |
sudo apt-get -y --no-install-recommends install gettext-base
envsubst < src/app/build_env.py > src/app/build_env.with.env.py
mv src/app/build_env.with.env.py src/app/build_env.py
- run:
name: Build and upload docker image
command: |
export D_RELEASE=0.2.4
wget -O - https://cdn.rawgit.com/f213/d/351d2459/install.sh|sh
./d build-image gdml/image src
./d push-image gdml/image
deploy-service:
steps:
- attach_workspace:
at: .
- run:
name: Install deploy tooling
command: |
export D_RELEASE=0.3.0
wget -O - https://cdn.rawgit.com/f213/d/351d2459/install.sh|sh
- run:
name: Add host key
command: ./d add-host-key
- run:
name: Migrate DB
command: |
./d run-command -i gdml/image:${CIRCLE_SHA1} --env-from=service_api circle@cluster-manager.gdml.ru ./manage.py migrate --noinput
- run:
name: Update image
command: |
./d update-image circle@cluster-manager.gdml.ru service gdml/image:${CIRCLE_SHA1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.