Skip to content

megaclan3000/megaclan3000

Repository files navigation

megaclan3000 Build Status GoDoc Go Report Card HitCount Maintainability GitHub issues Go codecov Test Coverage golangci-lint deepcode Labeler Docker Pulls Docker Image Version (latest by date)

Suport the developers

Buy the developers a coffee or a beer if you like this application! Your contribution will keep the server running ;)

ko-fi

Deployment

Configuration config.json

You will need to create a configuration with your Steam API-key and the IDs you want to include. To get started use the provided configuration example and copy it over or rename it to config.json

Start Postgres Database container

sudo docker run --name mega-postgres -p5432:5432  -e POSTGRES_PASSWORD=megaclan  postgres

Start with Docker

The application is available as docker container, which is automatically build on new pushes to master (latest tag) and on releases (vX.X tag). It requires a docker volume with the configuration file to be mounted in /var/megaclan3000/ inside the container.

To start the container pull the image and run a new container, exposing the 8080 port to the host system. Place the config file as created above inside a folder and mount it.

docker pull pinpox/megaclan3000
docker run -v /path/to/local/data/folder:/var/megaclan3000 -p 8080:8080 pinpox/megaclan3000

You should see the container running with docker ps and be able to browse localhost:8080 to view the application.

Start from binary

To setup the application from source, clone the repo to your server and build it using go build.

Service file

While you can just start the compiled binary manually, you will probably want to keep it running and have it start on boot automatically. For systemd distributions, use the following service file.

# /etc/systemd/system/megaclan3000.service

[Unit]
Description=Megaclan3000 Homepage
After=network-online.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=www-data
WorkingDirectory=/var/www/megaclan3000
ExecStart=/var/www/megaclan3000/megaclan3000

[Install]
WantedBy=multi-user.target

New Deployment

  • install docker
  • install docker-compose
  • create nginx config