Compare commits
8 Commits
431253ea5e
...
e5474789b0
Author | SHA1 | Date | |
---|---|---|---|
e5474789b0 | |||
b221fa3135 | |||
75a90e6a3c | |||
23869939e8 | |||
e541a98978 | |||
2f0641a33b | |||
309f5135c9 | |||
9682c67bc4 |
38
.drone.yml
Normal file
38
.drone.yml
Normal 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
6
Dockerfile
Normal 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
11
Makefile
Normal 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
31
README.md
Normal 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
3
docker-entry.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
cd /app
|
||||
mkdocs serve
|
Loading…
Reference in New Issue
Block a user