You can definitely accomplish this on one droplet. You need to set up DNS records for both subdomains that point to the droplet’s IP address. Check out this article for more information on how you can do that using DigitalOcean’s DNS panel.
Then, you need to have you web server set to listen for both domains and proxy them correctly. Do you already have something like Nginx sitting in front of your meteor app? The Nginx would probably look something like:
# Standard Nginx/PHP setup serving www.mydomain.com
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
server_name www.mydomain.com;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
# Proxy requests for www.portal.mydomain.com to the meteor app
# Upstream server listening on localhost port
upstream app_server {
server 127.0.0.1:58080 fail_timeout=0;
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name www.portal.mydomain.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://app_server;
}
}
Once you have that setup, you simply need to have your public landing page direct users to the right URL when they log in to the site.
Hopefully this points you in the right direction. If you’ve got any more specific questions, free free to ask!