Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

Commit bb725c6

Browse files
author
illusi0nary
committed
Docker Preps + Automation + Trickt&Treat Feature
1 parent ca9e472 commit bb725c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+144
-1959
lines changed

β€Ž.eslintrc.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
},
1616
overrides: [
1717
{
18-
files: ['lang/*.js'],
18+
files: ['app/lang/*.js'],
1919
rules: {
2020
'require-jsdoc': 'off',
2121
},
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build Workflow
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
job_one:
8+
name: Build and push docker images
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Build docker-image
13+
env:
14+
DOCKER_USER: ${{ secrets.DOCKER_USER }}
15+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
16+
run: |
17+
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
18+
docker build -f ./docker/spooky-node/DockerfileProd --build-arg NODE_VERSION=12.18.2 -t spookybot/spookybot:latest -t spookybot/spookybot:${{github.run_number}} .
19+
docker push spookybot/spookybot:${{github.run_number}}
20+
docker push spookybot/spookybot:latest
21+
docker logout
22+
23+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Deployment Workflow
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tags:
6+
description: 'Tag'
7+
jobs:
8+
deploy_prod_bot:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: appleboy/ssh-action@master
12+
name: deploy to prod
13+
with:
14+
host: ${{ secrets.SSH_IP }}
15+
port: ${{ secrets.SSH_PORT }}
16+
username: spookybot
17+
key: ${{ secrets.SSH_KEY }}
18+
script: |
19+
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
20+
docker pull spookybot/spookybot:latest
21+
docker-compose -f /home/spookybot/docker-compose.yml down -v
22+
docker-compose -f /home/spookybot/docker-compose.yml up -d
23+
docker logout
24+

β€Ž.gitignoreβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ jspm_packages/
1515

1616
# Optional eslint cache
1717
.eslintcache
18+
.eslintrc.js
1819

1920
# Yarn Integrity file
2021
.yarn-integrity
2122

2223
# config file
23-
config.json
24-
24+
app/config/config.json
2525
# IDE
2626
.idea
2727
*.iml
28+
29+

β€ŽMakefileβ€Ž

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
DOCKERCOMPOSE_DEV=-f docker-compose.dev.yml
2+
3+
4+
.PHONY: build_dev_image
5+
build_dev_image:
6+
docker build -f ./docker/spooky-node/DockerfileDev -t spookybot:dev .
7+
8+
.PHONY: startup_dev
9+
startup_dev:
10+
docker-compose ${DOCKERCOMPOSE_DEV} up -d
11+
12+
.PHONY: stop_dev
13+
stop_dev:
14+
docker-compose ${DOCKERCOMPOSE_DEV} down -v

β€ŽREADME.mdβ€Ž

Lines changed: 3 additions & 2 deletions

β€Žcommands/Configuration/setlang.jsβ€Ž renamed to β€Žapp/commands/Configuration/setlang.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { MessageEmbed } = require('discord.js')
2-
const { prefix, colors } = require('../../config.json')
2+
const { prefix, colors } = require('../../config/config.json')
33

44
const { readdirSync } = require('fs')
55
const { resolve } = require('path')

β€Žcommands/Info/help.jsβ€Ž renamed to β€Žapp/commands/Info/help.jsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { MessageEmbed } = require('discord.js')
2-
const { prefix, colors } = require('../../config.json')
3-
const { version } = require('../../package.json')
2+
const { prefix, colors } = require('../../config/config.json')
3+
const { version } = require('../../../package.json')
44

55
module.exports = {
66
config: {

β€Žcommands/Info/invite.jsβ€Ž renamed to β€Žapp/commands/Info/invite.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { MessageEmbed } = require('discord.js')
2-
const { prefix, colors } = require('../../config.json')
2+
const { prefix, colors } = require('../../config/config.json')
33

44
module.exports = {
55
config: {

β€Žcommands/Info/ping.jsβ€Ž renamed to β€Žapp/commands/Info/ping.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { MessageEmbed } = require('discord.js')
2-
const { prefix, colors } = require('../../config.json')
2+
const { prefix, colors } = require('../../config/config.json')
33

44
module.exports = {
55
config: {

0 commit comments

Comments
Β (0)