playnite-web-app • Docs
playnite-web-app / contributing/development-environment/dev-container
Install the following software on your local machine:
- vscode
- Dev containers vscode extension,
code --install-extension ms-vscode-remote.remote-containers
- XServer (for running Cypress tests).
- For OSX, recommend: XQuartz
- For Windows, still need a recommendation.
- Docker
- gh CLI
First, enable X11 forwarding for your SSH configuration by editing ~/.ssh/config
.
Host *
ForwardX11 yes
Once an XServer is installed, such as XQuartz, ensure it is configured to Authenticate and Allow connections from network clients. This can be done via the security settings of XQuartz.
Also ensure XQuartz starts at login.
Finally, sign out completely and sign back in.
Next, allow connections from your host machine's IP address. Here is an example is bash:
IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
xhost + $IP
# If xhost is not found, try:
/usr/X11/bin/xhost + $IP
- Fork the playnite-web repo
- Open the repo in vscode.
- Ensure docker is running.
- Open the command palette, type/search for comand
Dev Containers: Rebuild and Reopen container
. Allow the container to be built and started. - Once the dev container is running and connected to vscode, run
yarn
in its terminal. - Run
yarn nx run playnite-web-app:start
- In vscode, forward port 3000. This is likely done automatically or can be done with the
Forward Port
from the command palette. - Open http://localhost:3000.
- Continue to see commands for additional commands.
You can run Cypress component and E2E tests from the terminal in the dev container.