This repository has been archived by the owner on Sep 28, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from start-again/docker_preps
Docker preps
- Loading branch information
Showing
64 changed files
with
144 additions
and
1,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Build Workflow | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
job_one: | ||
name: Build and push docker images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build docker-image | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
docker build -f ./docker/spooky-node/DockerfileProd --build-arg NODE_VERSION=12.18.2 -t spookybot/spookybot:latest -t spookybot/spookybot:${{github.run_number}} . | ||
docker push spookybot/spookybot:${{github.run_number}} | ||
docker push spookybot/spookybot:latest | ||
docker logout | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Deployment Workflow | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tags: | ||
description: 'Tag' | ||
jobs: | ||
deploy_prod_bot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: appleboy/ssh-action@master | ||
name: deploy to prod | ||
with: | ||
host: ${{ secrets.SSH_IP }} | ||
port: ${{ secrets.SSH_PORT }} | ||
username: spookybot | ||
key: ${{ secrets.SSH_KEY }} | ||
script: | | ||
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
docker pull spookybot/spookybot:latest | ||
docker-compose -f /home/spookybot/docker-compose.yml down -v | ||
docker-compose -f /home/spookybot/docker-compose.yml up -d | ||
docker logout | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
DOCKERCOMPOSE_DEV=-f docker-compose.dev.yml | ||
|
||
|
||
.PHONY: build_dev_image | ||
build_dev_image: | ||
docker build -f ./docker/spooky-node/DockerfileDev -t spookybot:dev . | ||
|
||
.PHONY: startup_dev | ||
startup_dev: | ||
docker-compose ${DOCKERCOMPOSE_DEV} up -d | ||
|
||
.PHONY: stop_dev | ||
stop_dev: | ||
docker-compose ${DOCKERCOMPOSE_DEV} down -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
commands/Configuration/setlang.js → app/commands/Configuration/setlang.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions
5
commands/Text/trickortreat.js → app/commands/Text/trickortreat.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"servers": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"trickortreats": [ | ||
{ | ||
"userId": "306856370454396928", | ||
"tricks": 0, | ||
"treats": 0, | ||
"lastPlayed": "2020-10-06T22:55:33.107Z" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3.6' | ||
|
||
services: | ||
spooky-bot: | ||
image: spookybot/spookybot:latest | ||
build: | ||
context: . | ||
dockerfile: docker/spooky-node/DockerfileProd | ||
args: | ||
- NODE_VERSION=12.18.2 | ||
volumes: | ||
- ./app:/spooky/app/:rw | ||
- ./package.json:/spooky/package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ARG NODE_VERSION | ||
|
||
FROM node:${NODE_VERSION} AS build | ||
|
||
COPY . /spooky | ||
|
||
WORKDIR /spooky | ||
RUN npm cache clean --force | ||
RUN rm -rf node_modules | ||
RUN npm install | ||
|
||
FROM node:${NODE_VERSION} | ||
WORKDIR /spooky | ||
COPY --from=build /spooky /spooky | ||
|
||
ENTRYPOINT ["npm", "run", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
ARG NODE_VERSION | ||
|
||
FROM node:${NODE_VERSION} | ||
|
||
COPY . /spooky | ||
|
||
WORKDIR /spooky | ||
RUN npm cache clean --force | ||
RUN rm -rf node_modules | ||
RUN npm install --production | ||
|
||
RUN rm -rf app/config | ||
RUN rm -rf app/db | ||
ENTRYPOINT ["npm", "run", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "spookybot", | ||
"version": "1.0.0", | ||
"description": "A spooky Discord bot", | ||
"main": "core.js", | ||
"main": "app/core.js", | ||
"repository": "[email protected]:LucasCtrl/spookyBot.git", | ||
"author": "LucasCtrl <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -21,7 +21,7 @@ | |
"prettier": "^2.1.2" | ||
}, | ||
"scripts": { | ||
"dev": "nodemon --inspect core.js", | ||
"start": "node core.js" | ||
"dev": "nodemon --inspect ./app/core.js", | ||
"start": "node app/core.js" | ||
} | ||
} |
Oops, something went wrong.