Skip to content

Commit 77f7dd2

Browse files
committed
added SERVER_NAME config in Docker and updated docs
1 parent 43f5844 commit 77f7dd2

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ services:
2929
web:
3030
build: .
3131
environment:
32-
HOST_IP: '0.0.0.0'
33-
HOST_PORT: '5000'
3432
DATABASE_URL: postgresql://postgres:test@postgres:5432/opev
3533
REDIS_URL: redis://redis:6379/0
3634
C_FORCE_ROOT: "true"
35+
SERVER_NAME: $SERVER_NAME
3736
links:
3837
- postgres:postgres
3938
- redis:redis

docs/INSTALLATION_AWS.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ sudo usermod -a -G docker $(whoami)
7474

7575
The third phase is about building the Open Event on the server and running it. The steps are very similar to the [Docker installation instructions](INSTALLATION_DOCKER.md) so it is very highly recommended you have a look at it and try to understand the process.
7676

77-
* First you will have to build the server. This process can take some time.
77+
* First we will set the `SERVER_NAME` config. (See [Docker instructions](INSTALLATION_DOCKER.md) for more info on this)
78+
79+
```sh
80+
export SERVER_NAME="ec2-52-41-207-116.us-west-2.compute.amazonaws.com"
81+
```
82+
83+
* Then we will build the server. This process can take some time.
7884

7985
```sh
8086
git clone https://github.com/fossasia/open-event-orga-server.git && cd open-event-orga-server

docs/INSTALLATION_DIGITALOCEAN.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,14 @@ sudo apt-get -y install python-pip
5151
sudo pip install docker-compose
5252
```
5353

54-
* Now that Docker and Compose are setup, it's time to build the image. The next steps are very similar to the [running Open Event on Docker](INSTALLATION_DOCKER.md) tutorial so please see
55-
it.
54+
* Now that Docker and Compose are setup, it's time to build the image. The next steps are very similar to the [running Open Event on Docker](INSTALLATION_DOCKER.md)
55+
tutorial so please see it.
5656

57-
* We will start by cloning the GitHub Open Event Orga Server repo and cd'ing into it's directory. Then we will build and run the image.
57+
* We will start by cloning the GitHub Open Event Orga Server repo and cd'ing into it's directory. Then we will set the `SERVER_NAME` and then build and run the image.
5858

5959
```bash
6060
git clone https://github.com/fossasia/open-event-orga-server.git && cd open-event-orga-server
61+
export SERVER_NAME=104.236.228.132
6162
docker-compose build
6263
docker-compose up
6364
```
@@ -115,3 +116,6 @@ docker-compose up -d
115116
* If you haven't added a domain name to your DO droplet and are accessing it through the IP, you might face the problem of not being able to login. This is a Chrome issue
116117
and may exist in other browsers too (haven't tested). Learn more about it in this [Stack Overflow answer](http://stackoverflow.com/a/27276450/2295672). The only way to solve
117118
this is by attaching a domain name to your droplet.
119+
120+
* `SERVER_NAME` should be the same as the domain on which the project is running. Don't include http, https, www etc in server name.
121+
Also don't include the trailing '/' in the domain name.

docs/INSTALLATION_DOCKER.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
git clone https://github.com/fossasia/open-event-orga-server.git && cd open-event-orga-server
1414
```
1515

16+
* Then set the required `SERVER_NAME` environment variable. `SERVER_NAME` should the same as the domain on which the server is running and it should not include 'http', 'https',
17+
'www' or the trailing slash (/) in the url. Examples - `domain.com`, `sub.domain.com`, `sub.domain.com:5000` etc
18+
19+
```bash
20+
export SERVER_NAME=localhost;
21+
```
22+
1623
* In the same terminal window, run `docker-compose build` to build open-event-orga-server's docker image. This process can take some time.
1724

1825
* After build is done, run `docker-compose up` to start the server.
@@ -43,7 +50,7 @@ python manage.py db stamp head
4350

4451
* Close the application's shell by `exit` command.
4552

46-
* That's it. Go to `localhost:80` on the web browser and Open Event Orga Server will be live.
53+
* That's it. Go to `localhost` on the web browser and Open Event Orga Server will be live.
4754

4855

4956
### Updating the Docker image
@@ -58,7 +65,7 @@ python manage.py db stamp head
5865
docker-compose run web python manage.py db upgrade
5966
```
6067

61-
* That should be all. Open `localhost:5000` in web browser to view the updated open-event-server.
68+
* That should be all. Open `localhost` in web browser to view the updated open-event-server.
6269

6370

6471

0 commit comments

Comments
 (0)