Video tutorial: https://youtu.be/7tpO9vhUhf4
Last active
March 9, 2018 00:59
-
-
Save thosakwe/9d7e68450ae03420386b0db4c6c22fc1 to your computer and use it in GitHub Desktop.
Basic Angel Deployment (Ubuntu 16.04 + nginx + systemd)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
root /home/web/foo/web; # Set to your static files directory | |
location / { | |
try_files $uri @proxy; # Try to serve static files; fallback to proxied Angel server | |
} | |
location @proxy { | |
proxy_pass http://127.0.0.1:3000; | |
proxy_http_version 1.1; # Important, do not omit | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Angel server | |
[Service] | |
Environment=ANGEL_ENV=production | |
User=web # Name of unprivileged `web` user | |
WorkingDirectory=/home/web/foo # Path to Angel project | |
ExecStart=/usr/lib/dart/bin/dart bin/prod.dart | |
Restart=always # Restart process on crash | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment