Compare commits

...

2 Commits

Author SHA1 Message Date
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
4 changed files with 81 additions and 6 deletions

57
.drone.yml Normal file
View File

@ -0,0 +1,57 @@
---
kind: pipeline
type: exec
name: build image
# trigger:
# event:
# exclude:
# - promote
steps:
- name: build
commands:
- docker build . -f git.lulzette.ru/lulzette/geeksstuffwiki:latest
- name: login
commands:
- docker login git.lulzette.ru -u lulzette -p $gitea_key
- name: push
commands:
- docker push git.lulzette.ru/lulzette/geeksstuffwiki:latest
# node:
# target: local
# ---
# kind: pipeline
# type: exec
# name: deploy to test
# steps:
# - name: Check playbook
# commands:
# - ansible-playbook -C playbook.yml
# node:
# target: shell-scripts
---
kind: pipeline
type: docker
name: deploy to geeksstuffwiki.ru
steps:
- name: Run image
image: git.lulzette.ru/lulzette/geeksstuffwiki:latest
pull: always
detach: true
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

View File

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

3
docker-entry.sh Executable file
View File

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