Compare commits

..

8 Commits

Author SHA1 Message Date
e5474789b0 publish
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/push Build is passing
2022-11-13 19:20:08 +03:00
b221fa3135 fix
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2022-11-13 19:15:43 +03:00
75a90e6a3c fix deploy 2022-11-13 19:13:36 +03:00
23869939e8 Fix environment
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2022-11-13 19:00:02 +03:00
e541a98978 Fuck
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-13 18:57:15 +03:00
2f0641a33b Drone
Some checks failed
continuous-integration/drone/push Build is failing
2022-11-13 18:54:55 +03:00
309f5135c9 Dockerfile 2022-11-13 18:54:51 +03:00
9682c67bc4 makefile 2022-11-13 16:46:06 +03:00
5 changed files with 89 additions and 0 deletions

38
.drone.yml Normal file
View File

@ -0,0 +1,38 @@
---
kind: pipeline
type: exec
name: build image
steps:
- name: build
commands:
- docker build . -t git.lulzette.ru/lulzette/geeksstuffwiki:latest
- name: login
commands:
- docker login git.lulzette.ru -u lulzette -p $gitea_key
environment:
gitea_key:
from_secret: gitea_key
- name: push
commands:
- docker push git.lulzette.ru/lulzette/geeksstuffwiki:latest
---
kind: pipeline
type: exec
name: deploy
steps:
- name: Run image
commands:
- docker run --name docs -p 8000:8000 -d git.lulzette.ru/lulzette/geeksstuffwiki:latest
trigger:
event:
- promote
target:
- production
node:
target: geeksstuffwiki
depends_on:
- build image

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM alpine:3.16.3
RUN apk update && apk add py-pip make
COPY . /app
RUN cd /app && make prepare && make build
CMD [ "/app/docker-entry.sh" ]
EXPOSE 8000

11
Makefile Normal file
View File

@ -0,0 +1,11 @@
all: build serve
build:
mkdocs build
clean:
rm -rfv site/
prepare:
pip install mkdocs mkdocs-windmill-dark
unprepare:
pip uninstall mkdocs mkdocs-windmill-dark
serve:
mkdocs serve

31
README.md Normal file
View File

@ -0,0 +1,31 @@
Исходники сайта geeksstuffwiki.ru
===
# Локальное поднятие
## Подготовка:
`make prepare`
## Сборка и запуск:
`make`
## Прибрать за собой
`make clean`
## Удалить сборочные зависимости
`make unprepare`
## Поднять веб-сервер
`make serve`
# Автодеплой
Все данные помещаются в контейнер. Порт - 8000. docker-entry.sh - скрипт для запуска mkdocs.
1. Собирается докер образ.
2. Поднимается на сервере после promote

3
docker-entry.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cd /app
mkdocs serve