-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: running using docker modified #7216
Merged
iamareebjamal
merged 5 commits into
fossasia:development
from
DiptoChakrabarty:development
Sep 11, 2020
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bb51720
doc for running using docker modified
DiptoChakrabarty bb7e807
modified steps to run server in docker
DiptoChakrabarty ea382e0
update changes to doc
DiptoChakrabarty c19f5c6
env file secret key addition
DiptoChakrabarty fdc25d0
Merge branch 'development' into development
DiptoChakrabarty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -13,44 +13,19 @@ | |||||
git clone https://github.com/fossasia/open-event-server.git && cd open-event-server | ||||||
``` | ||||||
|
||||||
* 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', | ||||||
'www' or the trailing slash (/) in the url. Examples - `domain.com`, `sub.domain.com`, `sub.domain.com:5000` etc | ||||||
* craete env file using the following command | ||||||
|
||||||
```bash | ||||||
export SERVER_NAME=localhost; | ||||||
```sh | ||||||
cp .env.example .env | ||||||
``` | ||||||
Add SECRET_KEY in the env file to run properly in production mode . To generate a good secret value run python -c 'import secrets;print(secrets.token_hex())' | ||||||
|
||||||
|
||||||
* In the same terminal window, run `docker-compose build` to build open-event-server's docker image. This process can take some time. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not needed |
||||||
|
||||||
* After build is done, run `docker-compose up` to start the server. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* If you are doing it for the first time, you will have to create the database (and then tables). | ||||||
So keeping `docker-compose up` active in one terminal window, open another terminal window **in the same directory**. In there type the following command. | ||||||
|
||||||
```bash | ||||||
docker-compose run postgres psql -h postgres -p 5432 -U open_event_user --password open_event | ||||||
``` | ||||||
|
||||||
* Write 'opev_pass' as password and ENTER. When inside psql shell, write the following command - | ||||||
|
||||||
```sql | ||||||
create database opev; | ||||||
# CREATE DATABASE | ||||||
``` | ||||||
|
||||||
* Then exit the shell by typing `\q` and ENTER. | ||||||
|
||||||
* Now the database is created, so let's create the tables. Open the application's shell by `docker-compose run web sh`. Then write the following commands. | ||||||
|
||||||
```bash | ||||||
python3 create_db.py | ||||||
# ^^ write super_admin email and password when asked | ||||||
python3 manage.py db stamp head | ||||||
``` | ||||||
|
||||||
* Close the application's shell by `exit` command. | ||||||
|
||||||
* That's it. Go to `localhost` on the web browser and Open Event Orga Server will be live. | ||||||
* That's it. Go to `localhost:8080` on the web browser and Open Event Orga Server will be live. | ||||||
|
||||||
|
||||||
### Updating the Docker image | ||||||
|
@@ -65,7 +40,7 @@ python3 manage.py db stamp head | |||||
docker-compose run web python3 manage.py db upgrade | ||||||
``` | ||||||
|
||||||
* That should be all. Open `localhost` in web browser to view the updated open-event-server. | ||||||
* That should be all. Open `localhost:8080` in web browser to view the updated open-event-server. | ||||||
|
||||||
|
||||||
|
||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.