Replaced docker with netlify deployment (#37)
This commit is contained in:
Родитель
fde622d204
Коммит
3a519ffd6a
28
.drone.yml
28
.drone.yml
|
@ -2,6 +2,9 @@ workspace:
|
|||
base: /srv/app
|
||||
path: src
|
||||
|
||||
branches:
|
||||
- master
|
||||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git:1
|
||||
|
@ -16,30 +19,19 @@ pipeline:
|
|||
- make clean
|
||||
- make build
|
||||
|
||||
docker:
|
||||
image: plugins/docker:17.05
|
||||
publish:
|
||||
image: lucap/drone-netlify:latest
|
||||
pull: true
|
||||
secrets: [ docker_username, docker_password ]
|
||||
repo: gitea/redirects
|
||||
tags: [ '${DRONE_BRANCH##release/v}' ]
|
||||
secrets: [ netlify_token ]
|
||||
site_id: 43f026dd-02e6-4cd9-846c-f8a1539d3570
|
||||
path: public/
|
||||
when:
|
||||
event: [ push ]
|
||||
branch: [ release/* ]
|
||||
|
||||
docker:
|
||||
image: plugins/docker:17.05
|
||||
pull: true
|
||||
secrets: [ docker_username, docker_password ]
|
||||
repo: gitea/redirects
|
||||
tags: [ 'latest' ]
|
||||
when:
|
||||
event: [ push ]
|
||||
branch: [ master ]
|
||||
|
||||
discord:
|
||||
image: appleboy/drone-discord:1.0.0
|
||||
image: appleboy/drone-discord:1
|
||||
pull: true
|
||||
secrets: [ discord_webhook_id, discord_webhook_token ]
|
||||
when:
|
||||
event: [ push, tag, pull_request ]
|
||||
event: [ push, tag ]
|
||||
status: [ changed, failure ]
|
||||
|
|
14
Dockerfile
14
Dockerfile
|
@ -1,14 +0,0 @@
|
|||
FROM alpine:edge
|
||||
EXPOSE 80
|
||||
|
||||
RUN apk update && \
|
||||
apk add \
|
||||
caddy \
|
||||
mailcap && \
|
||||
rm -rf \
|
||||
/var/cache/apk/*
|
||||
|
||||
CMD ["/usr/sbin/caddy", "-conf", "/etc/caddy/caddy.conf"]
|
||||
|
||||
COPY docker/caddy.conf /etc/caddy/caddy.conf
|
||||
COPY public /srv/www
|
|
@ -1,22 +0,0 @@
|
|||
:80 {
|
||||
root /srv/www
|
||||
|
||||
errors {
|
||||
404 /404.html
|
||||
}
|
||||
|
||||
rewrite {
|
||||
regexp /gitea/.+
|
||||
to /gitea
|
||||
}
|
||||
|
||||
rewrite {
|
||||
regexp /sdk/.+
|
||||
to /sdk
|
||||
}
|
||||
|
||||
rewrite {
|
||||
regexp /git/.+
|
||||
to /git
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
/*
|
||||
Content-Security-Policy: default-src 'self'
|
||||
X-Frame-Options: DENY
|
||||
X-Xss-Protection: 1; mode=block
|
||||
X-Content-Type-Options: nosniff
|
||||
Referrer-Policy: strict-origin-when-cross-origin
|
|
@ -0,0 +1,5 @@
|
|||
https://gitea-code.netlify.com/* https://code.gitea.io/:splat 302!
|
||||
|
||||
/gitea/* /gitea/ 302!
|
||||
/sdk/* /sdk/ 302!
|
||||
/git/* /git/ 302!
|
Загрузка…
Ссылка в новой задаче