Skip to content

Weather bot for Discord built using Node.js and nWeather

License

Notifications You must be signed in to change notification settings

josefaidt/discord-hansl

Repository files navigation

hansl

GitHub package version

code style dependencies dev dependencies License

A Discord bot built using Node.js, discordjs, and a custom GraphQL weather endpoint - nWeather as a weather-reporting bot.

Docker

This app includes a Dockerfile to build an image off of, as long as you have a valid .env file to run using. The scripts to build are saved in package.json

"scripts": {
  "build:docker": "yarn build:docker:image; yarn build:docker:container",
  "build:docker:image": "docker build --tag josefaidt/hansl:latest --tag josefaidt/hansl:$npm_package_version .",
  "build:docker:image:remote": "docker build https://github.com/josefaidt/discord-hansl.git",
  "build:docker:container": "docker container run -p 3000:3000 --name hansl --hostname APP_DISCORD_HANSL --env-file ./app/.env josefaidt/hansl:$npm_package_version"
}

Building Using Provided Scripts

Ensure you have both yarn and Docker installed in order to successfully build the image and container.

  • build:docker:image: builds the Docker image using the local assets
  • build:docker:image:remote: builds the Docker image using the master branch on the repository
  • build:docker:container: stops and removes existing containers using the name hansl, and builds a new container using the pulled image.
    • env-file (required): specify using an absolute path your environment dotfile based off provided .config/.env.sample
  • build:docker: runs the production build process, builds the Docker image from local assets, builds Docker container

About

Weather bot for Discord built using Node.js and nWeather

Resources

License

Stars

Watchers

Forks

Packages

No packages published