Deploy Elixir Phoenix
to Alibaba Cloud VMs.
Zero serverless limitations. Standardize your deployments across Alibaba Cloud virtual environments with direct root control, automated let's encrypt certificates, and managed DB options.
Deploying Elixir Phoenix to Alibaba Cloud Infrastructure
vxcloud simplifies container hosting on your own cloud. Rather than managing firewalls, web server configurations, and TLS renewal cron scripts, our deployment runner structures the underlying processes automatically.
Containerized Delivery
vxcloud compiles a production-grade Docker container for your Elixir Phoenix application using minimal alpine images.
Automated HTTPS routing
Automatic certificate registration and auto-renewals securely bind client connections on port 443.
Link cloud DB nodes
Link database components directly inside Alibaba Cloud. Connection configs flow straight into env structures.
Dynamic health probing
Redirect user requests only after container processes return a successful 200 state on target health paths.
Zero downtime updates
Rolling updates swap container nodes seamlessly, preventing service interruption during code changes.
Dedicated VPS compute
No request constraints or cold start delays. You retain 100% access to all CPU and memory resources.
Step-by-Step Deployment Commands
Follow these three commands to provision virtual server hardware and trigger a secure, containerized deployment.
# Create the virtual server using the CLI
vxcli vm create \
--name web-instance \
--cloud alibaba --region ap-southeast-1 --instance-type ecs.t5-lc1m2.large \
--key-pair-name PRODKEY1
# Save public IP address for deployment
export HOST_IP=<public-ip-from-output># Ensure you have a valid mix.exs in your root directory.
# Below is the typical Dockerfile compiled by our template runner:
FROM elixir:1.15-alpine AS builder
WORKDIR /app
RUN mix local.hex --force && mix local.rebar --force
ENV MIX_ENV=prod
COPY mix.exs mix.lock ./
RUN mix deps.get --only prod && mix deps.compile
COPY . .
RUN mix assets.deploy && mix release
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/_build/prod/rel/myapp ./
EXPOSE 4000
CMD ["bin/myapp", "start"]# Trigger the container build and establish reverse proxy routes
vxcli deploy phoenix \
--source-dir ./ \
--app-name web-app \
--http-port 80 \
--app-port 4000 \
--env PORT=4000 \
--env DATABASE_URL=postgres://... \
--enable-ssl \
--domain app.example.com \
--ssl-email [email protected] \
--host $HOST_IP --ssh-user ubuntu --key-pair-name PRODKEY1
# app.example.com is now live with automated Let's Encrypt SSL.Production Best Practices Checklist
- Builds native Erlang releases for high performance and tiny deployment weight.
- Optimized WebSocket proxy configurations support thousands of LiveView connections.
- Supports horizontal node clustering across private server networks.
- Runs Ecto database migrations automatically before startup.
Frequently Asked Questions
Deploy Elixir Phoenix to Alibaba Cloud today
Experience smooth developer workflows directly on your own infrastructure. No lock-in, flat pricing.
Other deployment pathways
- Deploy Elixir Phoenix to Amazon Web Services (AWS)Step-by-step guide for hosting Elixir Phoenix apps.
- Deploy Elixir Phoenix to Google Cloud Platform (GCP)Step-by-step guide for hosting Elixir Phoenix apps.
- Deploy Elixir Phoenix to Microsoft AzureStep-by-step guide for hosting Elixir Phoenix apps.
- Deploy FastAPI to Alibaba CloudRun containerized FastAPI workloads.
- Deploy Next.js to Alibaba CloudRun containerized Next.js workloads.
- Deploy Django to Alibaba CloudRun containerized Django workloads.