I have been battling with this issue and will need help.
So I am using django-cookiecutter + docker for the project.
The app runs ok after deploying the docker container to the server.
But when trying to push changes through cirlceci, the I get this error at the deploy phase
Creating CA: /home/circleci/.docker/machine/certs/ca.pem
Creating client certificate: /home/circleci/.docker/machine/certs/cert.pem
Running pre-create checks...
Creating machine...
(production) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
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
Update: 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
production.yml
version: '3'
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_traefik: {}
services:
django: &django
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: app_api_production_django
depends_on:
- postgres
- redis
env_file:
- ./.envs/.production/.django
- ./.envs/.production/.postgres
command: /start
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: vest_api_production_postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
env_file:
- ./.envs/.production/.postgres
traefik:
build:
context: .
dockerfile: ./compose/production/traefik/Dockerfile
image: app_api_production_traefik
depends_on:
- django
volumes:
- production_traefik:/etc/traefik/acme
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
redis:
image: redis:3.2
celeryworker:
<<: *django
image: app_api_production_celeryworker
command: /start-celeryworker
celerybeat:
<<: *django
image: app_api_production_celerybeat
command: /start-celerybeat
flower:
<<: *django
image: app_api_production_flower
ports:
- "5555:5555"
command: /start-flower
awscli:
build:
context: .
dockerfile: ./compose/production/aws/Dockerfile
env_file:
- ./.envs/.production/.django
volumes:
- production_postgres_data_backups:/backups
Any idea why this happens?