@@ -5,6 +5,8 @@ Obelisk provides an easy way to develop and deploy your [Reflex](https://github.
55- [Installing Obelisk](#installing-obelisk)
66- [Developing an Obelisk project](#developing-an-obelisk-project)
77- [Deploying](#deploying)
8+ - [Locally](#locally)
9+ - [EC2](#ec2)
810- [Mobile](#mobile)
911 - [iOS](#ios)
1012 - [Android](#android)
@@ -90,11 +92,28 @@ Every time you change the Haskell source files in frontend, common or backend, `
9092
9193## Deploying
9294
95+### Locally
96+
97+Build everything:
98+
99+```
100+nix-build -A exe -o result-exe
101+```
102+
103+Run the server:
104+
105+```
106+cd result-exe
107+./backend
108+```
109+
110+### EC2
111+
93112In this section we will demonstrate how to deploy your Obelisk app to an Amazon EC2 instance.
94113
95114First create a new EC2 instance:
96115
97−1. Launch a NixOS 17.09 EC2 instance (we recommend [this AMI](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-40bee63a))
116+1. Launch a NixOS 17.09 EC2 instance (we recommend [this AMI](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-40bee63a))
981171. In the instance configuration wizard ensure that your instance has at least 1GB RAM and 10GB disk space.
991181. When prompted save your AWS private key (`~/myaws.pem`) somewhere safe. We'll need it later during deployment.
1001191. Go to "Security Groups", select your instance's security group and under "Inbound" tab add a new rule for HTTP port 80.
@@ -153,7 +172,7 @@ Install Xcode 8.2 (contains iOS SDK 10.2) and open it so that it runs its post i
153172These versions will work out of the box but iOS SDKs prior to 11.3 should also work. You can choose another installed version in `default.nix`
154173
155174More recent Xcodes should also work, as long as one of the SDKs mentioned above has been used.
156−To add another SDK to your current Xcode, [download](https://developer.apple.com/download/more/) the corresponding Xcode, extract it and copy its SDK folder next to the installed one, e.g.
175+To add another SDK to your current Xcode, [download](https://developer.apple.com/download/more/) the corresponding Xcode, extract it and copy its SDK folder next to the installed one, e.g.
157176```
158177open -W Xcode_9.2.xip
159178sudo cp -R Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
@@ -167,7 +186,7 @@ xcodebuild -showsdks
167186
168187##### Certificates
169188To deploy and/or package apps, you'll need to inform Apple of your development devices and permissions by
170−adding credentials to the correct provisioning profile via the Apple Developer portal.
189+adding credentials to the correct provisioning profile via the Apple Developer portal.
171190
1721911. Open up XCode and go to Preferences - Accounts. Select the organization
173192Member role, click Manage Certificates, and add an iOS Development
@@ -244,8 +263,8 @@ Now edit your project's `default.nix` and tell Obelisk of your app's keystore fi
244263 ...
245264 android.applicationId = "com.example.myapp";
246265 android.displayName = "My App";
247− android.releaseKey =
248− { storeFile = /path/to/myandroidkey.jks;
266+ android.releaseKey =
267+ { storeFile = /path/to/myandroidkey.jks;
249268 storePassword = "abcd1234";
250269 keyAlias = "myandroidalias";
251270 keyPassword = "abcd1234";