Setting Up The Server
The first thing to do when setting up a backend like that in which was used in this project.
For EggChat, the backend was hosted on an EC2 AWS instance. The server ran Ubuntu. Use the AWS control panel to provision an instance. Then download the key-pair associated with the instance to ssh into the server
Make sure that you create any necessary security group rules to allow tcp, http, https, and ssh ports into and out of the server. You may also need an internet gateway,
Once you access the server you should download the necessary files and libraries to allow your code to run on the server.
You'll need: Docker, Docker-compose, and NGINX
Now navigate to /etc/nginx/conf.d and create a nginx configuration file
Then paste the following code in:
Then to restart the nginx server, run the following command
Now we can set up the docker components of the server
Wherever you want (but I recommend in the user folder) create a file named docker-compose.yml using the following command
and paste the following code in:
To run the server, run this and follow any prompts it gives:
Last updated