This project is a very minimal example of a working AdminAPI implementation for WorkAdventure.
This is not supposed to be a role model implementation, this is just to illustrate the bare bones as a way to understand how it works.
-
Clone WorkAdventure
-
Copy this project folder under the workadventure workspace naming it
admin
-
Change docker-compose.yml to add the following section:
admin: image: thecodingmachine/nodejs:16 command: yarn run start volumes: - ./admin:/usr/src/app environment: - ADMIN_URL=http://admin.workadventure.localhost labels: - "traefik.enable=true" - "traefik.http.routers.admin.rule=Host(`admin.workadventure.localhost`)" - "traefik.http.routers.admin.entryPoints=web" - "traefik.http.services.admin.loadbalancer.server.port=8080" - "traefik.http.routers.admin-ssl.rule=Host(`admin.workadventure.localhost`)" - "traefik.http.routers.admin-ssl.entryPoints=websecure" - "traefik.http.routers.admin-ssl.tls=true" - "traefik.http.routers.admin-ssl.service=admin"
-
Change the pusher definition in docker-compose.yml to add the following environment variable:
ADMIN_API_URL: http://admin:8080
-
Fire it up
Now that you are done, just head up to your local instance. You will see that there will be a new category in the top for "extra" and some additional hair and accessories will be present