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:
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Hi there,
This may be a policy configuration error on the repository. You can try decreasing the security for the repo. I’d also recommend being sure the user that you are pushing as has the right permissions.
Hope it helps! Best, Bobby