Skip to content

Commit 1d7c8d1

Browse files
authored
Update README.md
1 parent 813ec0f commit 1d7c8d1

File tree

1 file changed

+15
-38
lines changed

1 file changed

+15
-38
lines changed

README.md

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# csesoc.unsw.edu.au
22

3-
This repo houses the CSESoc website.
3+
This repo houses the static CSESoc website which will stand in for the new CMS-based website while it is in development.
44

55
## Getting Started
66

@@ -26,49 +26,38 @@ git clone https://github.com/csesoc/csesoc.unsw.edu.au
2626

2727
For the sake of development, please also have Golang installed on your local machine and yarn as a your JS package manager.
2828

29-
### Setting up environment variables
30-
31-
All tokens are being treated as environment variables and are purposely left out of the GitHub repository. The easiest way is to inject these secrets into the container as environment variables.
32-
33-
Contact the website project lead to get the tokens sent directly to you via secure mediums.
34-
35-
Docker expects a file named `.env` in the root directory of the project containing environment variables in the following format:
36-
37-
``` text
38-
{variable_name}={variable_value}
39-
```
40-
41-
Here is a sample valid `.env` file:
42-
43-
``` text
44-
ENV_VAR1=0123456789
45-
ENV_VAR2=super_secure_secret
46-
```
47-
48-
These environment variables are only reacheable during the building process of the Docker containers, not in the container themselves (by default). To pass them into their relevant container the `docker-compose.yml` file specifies the required env variables under the *environment* field for each service. Please read the section on [Security](#security).
49-
5029
### Installing
5130

52-
*Please check back regularly as deployment steps may change at any point within these early stages of development. Thank you for your patience.*
53-
5431
With the repo cloned, proceed to checkout to the dev branch.
5532

5633
From the root folder of the dev branch, run the following command in your terminal.
5734

5835
``` script
59-
docker-compose up -d --build
36+
docker-compose -f docker-compose-dev.yml up -d --build
6037
```
6138

6239
This will automatically build the images required for the containers, as well as the containers for the first time. After this images will not need to be built again until changes have been made to the dependencies. For subsequent runs, remove the `--build`.
6340

64-
The '-d' is to start the container in the background and leave them running. There will be three containers that start up `frontend`, `backend` and `mongo`. Once you are finished developing, run:
41+
The '-d' is to start the container in the background and leave them running. There will be three containers that start up `frontend`, `backend` and `mongo`.
42+
Note: once you have built the containers from here, you can do most docker operations from the UI such as starting/stopping the containers. You will only *need* to do this for your first setup or if you delete the containers / purge your docker data.
43+
44+
If you would rather use the commandline, once you are finished developing, run:
6545

6646
``` script
6747
docker-compose down -v
6848
```
6949

7050
which kills your containers and removes any bind mounts and named volumes but keeps your images. Be sure to use `docker-compose --help` for any additional help or other options.
7151

52+
You can also run just
53+
``` script
54+
docker-compose down
55+
```
56+
57+
if you want to erase your images from docker too (which can save some disk space).
58+
59+
You may want to be wary of docker as it is *extremely resource hungry*. It can occupy several gigs of RAM and will noticably cause increased battery drainage because it is constantly making use of the CPU. For your sanity you may want to make sure you *stop all containers and shut docker down* if you aren't working on the repo for your own sanity - if you have 32gb of RAM or greater <and aren't using battery power> this probably won't be an issue.
60+
7261
To access the website, the static files will be served on `0.0.0.0:8080` (`[::]:8080`) while the backend APIs are served on `0.0.0.0:1323` (`[::]:1323`). Make sure when you are making calls from the frontend to the backend in development stage, you use the suffix of the api call and not call with the domain e.g
7362

7463
``` javascript
@@ -136,18 +125,6 @@ To simplify things we are using environment variables instead of Docker Secrets.
136125
* [Golang](https://golang.org/) - Used to write the API and server backend.
137126
* [Swagger](https://swagger.io/) - API documentation framework
138127

139-
## System Architecture
140-
141-
For more on the system's architecture, please head to the [confluence page](https://compclub.atlassian.net/wiki/spaces/Projects/pages/845414415/Architectural+Guide).
142-
143-
## Contributing
144-
145-
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
146-
147-
## Authors
148-
149-
* **Tommy Truong** - *Initial work for README.md file* - [glebme](https://github.com/glebme)
150-
* **Sergio Mercado Ruiz** - *Setting up environment variables, API Documentation and Security sections.* - [sergiomercado19](https://github.com/sergiomercado19)
151128

152129
## License
153130

0 commit comments

Comments
 (0)