Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdaa0881

Browse files
committed
Add docker instructions
1 parent2061319 commitdaa0881

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

‎README.md‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,28 @@ and [Python Tutor](http://pythontutor.com/):
3030

3131
##Getting started
3232

33-
1. Clone the repository.
34-
2. In the`backend` folder:
33+
Below is how to get the code running on your local machine.
34+
35+
1. Fork the repository, and clone your fork.
36+
2. If you want to run the system using Docker, which may be easier and will more closely resemble the production environment:
37+
1. Ensure you have docker and docker-compose installed.
38+
2. Create an empty file called`.env` in the repo root.
39+
3. Run`docker-compose up`.
40+
4. Skip the following two steps, everything should be running now.
41+
3. In the`backend` folder:
3542
1. Ensure the`python` command points to Python 3.8.
3643
2. Run`./setup.sh`. This will:
3744
1. Install`poetry` if needed.
3845
2. Create a virtualenv and install Python dependencies.
3946
3. Create a sqlite database, run migrations, and create a user.
4047
3. Activate the virtualenv with`poetry shell`.
4148
4. Run the backend development server with`./manage.py runserver`.
42-
3. In the`frontend` folder:
49+
4. In the`frontend` folder:
4350
1. Ensure you have recent versions of`node` and`npm`.
4451
2. Run`npm install` to download dependencies.
4552
3. Run`npm start` to start the frontend development server.
46-
4. Go tohttp://localhost:3000/accounts/login/ and login with the email "admin@example.com" and the password "admin".
47-
5. You should be redirected tohttp://localhost:3000/course/ and see the start of the course: "Introducing The Shell".
53+
5. Go tohttp://localhost:3000/accounts/login/ and login with the email "admin@example.com" and the password "admin".
54+
6. You should be redirected tohttp://localhost:3000/course/ and see the start of the course: "Introducing The Shell".
4855

4956
##Controls
5057

‎backend/main/workers/pika.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
@thread_separate_lru_cache()
20-
@retry(num_attempts=10,sleeptime=2,log=log,exception_class=AMQPConnectionError)
20+
@retry(num_attempts=10,sleeptime=5,log=log,exception_class=AMQPConnectionError)
2121
defconnection():
2222
params=pika.URLParameters(os.environ['CLOUDAMQP_URL'])
2323
result=pika.BlockingConnection(params)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp