Skip to content
Dashboard

Can you run Docker Compose on Vercel?

Content Engineer

Copy link to headingHow does Vercel run containers instead?

Copy link to headingHow do Compose concepts map to Vercel?

Copy link to headingTranslate a compose file into services

services:
web:
build: ./web
ports:
- "3000:3000"
environment:
API_URL: http://api:4000
api:
build: ./api
environment:
DATABASE_URL: postgres://db:5432/app
depends_on:
- db
db:
image: postgres:16
volumes:
- dbdata:/var/lib/postgresql/data
volumes:
dbdata:

{
"services": {
"web": { "root": "web/", "entrypoint": "Dockerfile.vercel" },
"api": { "root": "api/", "entrypoint": "Dockerfile.vercel" }
},
"rewrites": [
{ "source": "/api/(.*)", "destination": { "service": "api" } },
{ "source": "/(.*)", "destination": { "service": "web" } }
]
}

Copy link to headingWhat doesn't translate

Copy link to headingFrequently asked questions

Copy link to headingDo I have to rewrite my compose file to deploy on Vercel?

Copy link to headingWhat replaces the volumes in my compose file?

Copy link to headingHow do containers talk to each other without a compose network?

Copy link to headingCan I still use Docker Compose for local development?

Copy link to headingRelated resources

Ready to deploy?