I have set up the docker registry at DigitalOcean to deploy my django application.
I have installed the doctl
and setup the API credentials.
If I run the command as:
doctl auth list
i can see my auth
as the current one, which has the Read
and Write
permission.
But now, when I try to run the command as:
docker-compose -f docker-compose.staging.yml push
I get the error as:
ERROR: error parsing HTTP 400 response body: unexpected end of JSON
input: “”
Here’s my docker-compose.staging.yml
file:
version: '3.8'
services:
web:
build:
context: ./app
dockerfile: Dockerfile.prod
image: registry.digitalocean.com/pythonist-do:web
command: gunicorn Pythonist.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/home/app/web/staticfiles
- media_volume:/home/app/web/mediafiles
expose:
- 8000
env_file:
- ./.env.staging
nginx-proxy:
container_name: nginx-proxy
build: nginx
image: registry.digitalocean.com/pythonist-do:nginx-proxy
restart: always
ports:
- 443:443
- 80:80
volumes:
- static_volume:/home/app/web/staticfiles
- media_volume:/home/app/web/mediafiles
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- web
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
env_file:
- ./.env.staging.proxy-companion
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- acme:/etc/acme.sh
depends_on:
- nginx-proxy
volumes:
static_volume:
media_volume:
certs:
html:
vhost:
acme: