mirror of
https://gitlab.jonasled.de/jonasled/discordbot
synced 2024-09-09 01:21:30 +02:00
delete gitlab-ci + docker files
This commit is contained in:
parent
0a4753105d
commit
ae790d8fc1
3 changed files with 0 additions and 57 deletions
|
@ -1,31 +0,0 @@
|
||||||
image: docker
|
|
||||||
services:
|
|
||||||
- docker:dind
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- echo "building branch $CI_COMMIT_REF_NAME, Version $version"
|
|
||||||
- git config --global user.name "build"
|
|
||||||
- git config --global user.email "noreply@jonasled.de"
|
|
||||||
- sudo docker pull python:3
|
|
||||||
- sudo docker build -t gitlab.jonasled.de/jonasled/discordbot .
|
|
||||||
- sudo docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
- sudo docker push gitlab.jonasled.de/jonasled/discordbot
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
stage: deploy
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- sudo apt-get install -y python-pip #install pip, this is needed to install docker-compose in the next step
|
|
||||||
- sudo pip install docker-compose #Install docker-compose with pip
|
|
||||||
- sudo docker-compose up -d #Start the new container
|
|
||||||
environment: master
|
|
||||||
|
|
16
Dockerfile
16
Dockerfile
|
@ -1,16 +0,0 @@
|
||||||
FROM python:3
|
|
||||||
|
|
||||||
LABEL Name=discordbot
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
ADD ./bot.py /
|
|
||||||
ADD ./duck.mp3 /
|
|
||||||
ADD ./wrong.mp3 /
|
|
||||||
ADD ./requirements.txt /
|
|
||||||
|
|
||||||
RUN apt update
|
|
||||||
RUN apt install sqlite3 -y
|
|
||||||
|
|
||||||
RUN python3 -m pip install -r requirements.txt
|
|
||||||
|
|
||||||
ENTRYPOINT python3 bot.py
|
|
|
@ -1,10 +0,0 @@
|
||||||
#This is the production compose file, if you want to develop use the docker-compose-build file.
|
|
||||||
version: '2.1'
|
|
||||||
services:
|
|
||||||
discord_bot:
|
|
||||||
image: discordbot:latest
|
|
||||||
volumes:
|
|
||||||
- ./config.py:/config.py
|
|
||||||
- database:/database.db
|
|
||||||
volumes:
|
|
||||||
database:
|
|
Loading…
Reference in a new issue