Updated gitlab-ci and docker-guide

This commit is contained in:
Kwoth
2022-03-18 23:49:35 +01:00
parent f6ee012b15
commit 339f13d31a
2 changed files with 43 additions and 30 deletions

View File

@@ -97,29 +97,29 @@ upload-windows-updater-release:
- aws --endpoint-url $AWS_SERVICE_URL s3api put-object --bucket "$AWS_BUCKET_NAME" --key "dl/bot/$INSTALLER_FILE_NAME" --acl public-read --body "$INSTALLER_OUTPUT_DIR/$INSTALLER_FILE_NAME" - aws --endpoint-url $AWS_SERVICE_URL s3api put-object --bucket "$AWS_BUCKET_NAME" --key "dl/bot/$INSTALLER_FILE_NAME" --acl public-read --body "$INSTALLER_OUTPUT_DIR/$INSTALLER_FILE_NAME"
- aws --endpoint-url $AWS_SERVICE_URL s3api put-object --bucket "$AWS_BUCKET_NAME" --key "dl/bot/releases-v3.json" --acl public-read --body "releases-v3.json" - aws --endpoint-url $AWS_SERVICE_URL s3api put-object --bucket "$AWS_BUCKET_NAME" --key "dl/bot/releases-v3.json" --acl public-read --body "releases-v3.json"
# docker-build: docker-build:
# # Use the official docker image. # Use the official docker image.
# image: docker:latest image: docker:latest
# stage: build stage: build
# services: services:
# - docker:dind - docker:dind
# before_script: before_script:
# - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
# # Default branch leaves tag empty (= latest tag) # Default branch leaves tag empty (= latest tag)
# # All other branches are tagged with the escaped branch name (commit ref slug) # All other branches are tagged with the escaped branch name (commit ref slug)
# script: script:
# - | - |
# if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
# tag="" tag=""
# echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'" echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
# else else
# tag=":$CI_COMMIT_REF_SLUG" tag=":$CI_COMMIT_REF_SLUG"
# echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
# fi fi
# - docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" . - docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
# - docker push "$CI_REGISTRY_IMAGE${tag}" - docker push "$CI_REGISTRY_IMAGE${tag}"
# # Run this job in a branch where a Dockerfile exists # Run this job in a branch where a Dockerfile exists
# rules: rules:
# - if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH
# exists: exists:
# - Dockerfile - Dockerfile

View File

@@ -1,18 +1,25 @@
# Setting up NadekoBot with Docker # Setting up NadekoBot with Docker
# DO NOT USE YET - WORK IN PROGRESS # WORK IN PROGRESS
### Docker Compose ### Installation
1. Create a `/srv/nadeko` folder
- `mkdir -p /srv/nadeko`
2. Create a `docker-compose.yml`
- nano `docker-compose.yml`
- copy the following contents into it:
##### docker-compose.yml
```yml ```yml
version: "3.7" version: "3.7"
services: services:
nadeko: nadeko:
image: registry.gitlab.com/veovis/nadekobot:v3-docker image: registry.gitlab.com/kwoth/nadekobot:latest
depends_on: depends_on:
- redis - redis
environment: environment:
TZ: Europe/Paris TZ: Europe/Paris
#NadekoBot_RedisOptions: redis,name=nadeko NadekoBot_RedisOptions: redis,name=nadeko
#NadekoBot_ShardRunCommand: dotnet #NadekoBot_ShardRunCommand: dotnet
#NadekoBot_ShardRunArguments: /app/NadekoBot.dll {0} {1} #NadekoBot_ShardRunArguments: /app/NadekoBot.dll {0} {1}
volumes: volumes:
@@ -27,6 +34,12 @@ services:
volumes: volumes:
- /srv/nadeko/redis-data:/data - /srv/nadeko/redis-data:/data
``` ```
3. Save your file and run docker compose
- `docker-compose up`
4. Edit creds in `/srv/nadeko/conf/creds.yml`
5. Run it again with
- `docker-compose up`
### Updating ### Updating
- `cd /srv/nadeko` - `cd /srv/nadeko`
- `docker-compose pull` - `docker-compose pull`