我一直在努力解决这个问题,需要帮助。 所以我正在为项目使用django-cookiecutter + docker。 将docker容器部署到服务器后,该应用程序运行正常。
但是当尝试通过cirlceci进行更改时,我在部署阶段遇到此错误
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env production
Building postgres
ERROR: SSL error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661)
Exited with code 1
我曾尝试过重新生成证书,但仍无所事事,我敢肯定,这是我遗漏的琐碎事情。 知道为什么会这样吗?
我的圈子config.xml
jobs:
build:
machine: true
working_directory: ~/app_api
steps:
- checkout
- run:
name: Run tests
command: |
docker-compose -f local.yml up -d
docker-compose -f local.yml run django python manage.py help
docker-compose -f local.yml run django pytest
deploy:
machine: true
working_directory: ~/app_api
steps:
- checkout
- add_ssh_keys:
fingerprints:
**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
- run:
name: Deploy Master to Digital Ocean
command: |
cp ./id_rsa.pub ~/.ssh
ls -al ~/.ssh
base=https://github.com/docker/machine/releases/download/v0.14.0 &&
curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine &&
sudo install /tmp/docker-machine /usr/local/bin/docker-machine
mkdir -p .envs/.production
echo POSTGRES_HOST=$POSTGRES_HOST >> .envs/.production/.postgres
echo REDIS_URL=$REDIS_URL >> .envs/.production/.django
...
docker-machine create --driver generic --generic-ip-address 1**.2**.1**.**7 --generic-ssh-key ~/.ssh/id_rsa production
eval "$(docker-machine env production)"
docker-compose -f production.yml build
docker-compose -f production.yml up -d
workflows:
version: 2
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build```