Clone this repository with following command:
git clone [email protected]:fuku-inc/labcode-test-environment.git
Move into labcode-test-environment
directory, run
bash clone_repositories.sh
Then, these repository is cloned:
labcode-sim
labcode-log-server
labcode-web-app
Copy template file with following command:
cp labcode-web-app/app/.env.example labcode-web-app/app/.env
Then, edit labcode-web-app/app/.env
and replace your-google-client-id.apps.googleusercontent.com
with correct client ID.
docker compose build
docker compose up -d
docker compose exec log_server sh -c "python -m define_db.models"
- Access to http://localhost:8000/docs#/users/create_users__post
- Click "Try it out"
- Enter email address to "email"
- Click "Execute"
- You will obtain response as follows:
{
"id": 1,
"email": "[email protected]"
}
- Memo the value of "id" as user ID
- Access to http://localhost:8000/docs#/projects/create_projects__post
- Click "Try it out"
- Enter project name to "name"
- Enter user ID obtained at user creation to "user_id"
- Click "Execute"
- You will obtain response as follows:
"id": 1,
"name": "test_project",
"user_id": 1,
"created_at": "2025-02-25T10:44:18.911007",
"updated_at": "2025-02-25T10:44:18.911017"
}
- Memo the value of "id" as project ID.
- Access to http://0.0.0.0:8080/docs#/default/run_experiment_run_experiment_post
- Click "Try it out"
- Enter project ID obtained at project creation to "project_id"
- Enter protocol name to "protocol_name"
- Enter user ID obtained at user creation to "user_id"
- Upload
labcode-test-environment/protocol.yaml
to "protocol_yaml" - Upload
labcode-test-environment/manipulate.yaml
to "manipulate_yaml" - Click "Execute"
Access to http://localhost:5173/
- Open a terminal
- Run the following command:
ip addr
Find the LAN IP address from the output:
(example)
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:1a:2b:3c:4d:5e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
valid_lft 86386sec preferred_lft 86386sec
In this example, 192.168.1.5 assigned to the eth0 (wired LAN) interface is the IP address within the LAN. Look for an IP address with these characteristics:
Usually in the format of 192.168.xxx.xxx, 10.xxx.xxx.xxx, or 172.16.xxx.xxx to 172.31.xxx.xxx Associated with eth0, eno1, enp0s3 (wired LAN) or wlan0, wlp2s0 (wireless LAN) Displayed with scope global
sudo nano /etc/hosts
192.168.1.5 labcode-web-app.com
(Replace 192.168.1.5 with the actual IP address of the web app server from the previous step)
Search for "Notepad" from the Start menu Right-click on it and select "Run as administrator"
192.168.1.5 labcode-web-app.com
(Replace 192.168.1.5 with the actual IP address of the web app server from the previous step)
Access to http://labcode-web-app.com:5173