* Replace 'docker-compose' with 'docker compose' * Use 'printf' approach to COMPILER_FLAGS for n64 egcs compiler * Use 'ubuntu-22.04' instead of 'ubuntu-latest'
2.0 KiB
Docker
There is a docker-compose.yaml file to help you spin up an instance quickly.
Prerequisites:
Docker
You will need Docker and Docker Compose. Follow the instructions for your distro.
Directories
You will need to create a directory for the postgres data in the base of the repo:
mkdir -p postgres
Note: This directory will get owned by postgres user when postgres first starts up!
Quickstart
Run in foreground:
docker compose up --build
The processes will run in the foreground until you CTRL+C to trigger a shutdown.
Navigate to http://localhost:80 in your browser.
Run daemonised:
docker compose up -d && docker compose logs -f
You can CTRL+C to stop tailing logs. If you want to stop the processes then running docker compose down will shut everything down.
Note: The first time you bring up the containers can take a minute or so - Docker has to pull/build images, grab Node dependencies, apply database migrations etc. Subsequent runs will be significantly faster to spin up.
Configuration
By default the Docker backend image is built without support for all platforms (e.g. PS2, Switch, Saturn). Platforms can be enabled by changing the ENABLE_<PLATFORM>_SUPPORT variables to "YES" in the docker-compose.yaml and re-running the docker compose up --build command.
E.g. to enable PS2 platform:
backend:
build:
context: backend
args:
#... <snip>
ENABLE_PS2_SUPPORT: "YES"
Connecting from a different host
If you wish to run decomp.me on one machine but connect from a different one (e.g. to test the site on your phone) please edit ./backend/docker.dev.env to add the hostname to the ALLOWED_HOSTS environment variable.
E.g. if your hostname is mylaptop:
ALLOWED_HOSTS="backend,localhost,127.0.0.1,mylaptop"