Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vtracker #44

Open
dusnake opened this issue Mar 17, 2022 · 3 comments
Open

vtracker #44

dusnake opened this issue Mar 17, 2022 · 3 comments

Comments

@dusnake
Copy link

dusnake commented Mar 17, 2022

Hi!

I would like to install this utility for your tool.

https://www.racedepartment.com/downloads/vtracker-2-timetable-for-acc-servers.40161/

I have seen you use these commands to start:

if which node > /dev/null
then
npm i
node server.js
else
echo "Node is not installed. I try to install it myself :). This procedure will only be done once"
sudo apt update
sudo apt install npm
npm install -g n
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
PATH="$PATH"
npm i
node server.js
fi

but it doesn't have npm installed, can you add it to docker to see how it works?

@gotzl
Copy link
Owner

gotzl commented Mar 18, 2022

Hi,
this seems quite interesting. I'll have a look at it.
However, I wonder if it would be an option to put vtracker into another container and just share the accservermanager-data volume? What do you think?
(Edit: one could use https://hub.docker.com/_/node as base for that ...)

@dusnake
Copy link
Author

dusnake commented Mar 20, 2022

I'll try it when I get some time, thank you very much!

@gotzl
Copy link
Owner

gotzl commented Mar 20, 2022

Hi,
so, I came up with this Dockerfile

# might try to use slim or alpine, but the node pkgs require python
FROM node:current

ENV VTRACKER_APP_PATH="./VT 2.2.1/Linux" \
    NODE_ENV=production

WORKDIR /home/node/app/

COPY ${VTRACKER_APP_PATH} /home/node/app
RUN chown -R node:node /home/node/app && \
    chmod 755 /home/node/app/

USER node
RUN npm install

EXPOSE 9000
CMD ["npm", "start"]

and this docker-compose.yml

version: "2"
services:
  acc:
    image: gotzl/accservermanager
    volumes:
      - /tmp/server:/server
      - accservermanager-data:/data
    environment:
      - ALLOWED_HOSTS=["*"]
      - SECRET_KEY=
    ports:
      - 9232:9232/tcp
      - 9231:9231/udp
      - 8000:8000
  vtracker:
    build: .
    volumes:
      - accservermanager-data:/data:ro
    ports:
      - 9000:9000
volumes:
    accservermanager-data:

Put these in a directory and extract the vtracker package to the same dir. Adjust the docker-compose.yml to your likings, then run docker-compose build and docker-compose up. This should give you the vtracker on port 9000. In vtracker, add a server with directory /data/instances/somename/results/, where somename is the name you chose for your server in accservermanager.

Feel free to play around with that and tell me what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants