mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 15:41:42 +00:00
commit
eab4e2dce6
5 changed files with 83 additions and 4 deletions
|
@ -1,7 +1,9 @@
|
||||||
|
# pwgen -1 32
|
||||||
|
RAILS_MASTER_KEY=11111111111111111111111111111111
|
||||||
RAILS_GROUPS=assets
|
RAILS_GROUPS=assets
|
||||||
DELEGATE=athshe.sutty.nl
|
DELEGATE=athshe.sutty.nl
|
||||||
HAINISH=../haini.sh/haini.sh
|
HAINISH=../haini.sh/haini.sh
|
||||||
DATABASE=
|
DATABASE_URL=postgres://suttier@postgresql.sutty.local/sutty
|
||||||
RAILS_ENV=development
|
RAILS_ENV=development
|
||||||
IMAP_SERVER=
|
IMAP_SERVER=
|
||||||
DEFAULT_FROM=
|
DEFAULT_FROM=
|
||||||
|
|
71
.woodpecker.yml
Normal file
71
.woodpecker.yml
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
pipeline:
|
||||||
|
publish:
|
||||||
|
image: "docker.io/woodpeckerci/plugin-docker-buildx"
|
||||||
|
settings:
|
||||||
|
registry: "gitea.nulo.in"
|
||||||
|
username: "sutty"
|
||||||
|
repo: "gitea.nulo.in/sutty/panel"
|
||||||
|
tags:
|
||||||
|
- "${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}"
|
||||||
|
- "latest"
|
||||||
|
build_args:
|
||||||
|
- "RUBY_VERSION=${RUBY_VERSION}"
|
||||||
|
- "RUBY_PATCH=${RUBY_PATCH}"
|
||||||
|
- "ALPINE_VERSION=${ALPINE_VERSION}"
|
||||||
|
- "BASE_IMAGE=gitea.nulo.in/sutty/rails"
|
||||||
|
purge: false
|
||||||
|
secrets:
|
||||||
|
- "DOCKER_PASSWORD"
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- "rails"
|
||||||
|
- "panel.sutty.nl"
|
||||||
|
event: "push"
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- "Dockerfile"
|
||||||
|
- ".dockerignore"
|
||||||
|
assets:
|
||||||
|
image: "gitea.nulo.in/sutty/panel:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}"
|
||||||
|
commands:
|
||||||
|
- "apk add python2 dotenv openssh-client brotli"
|
||||||
|
- "install -d -m 700 ~/.ssh/"
|
||||||
|
- "echo \"$${KNOWN_HOSTS}\" | base64 -d >> ~/.ssh/known_hosts"
|
||||||
|
- "chmod 600 ~/.ssh/known_hosts"
|
||||||
|
- "eval $(ssh-agent -s)"
|
||||||
|
- "echo \"$${SSH_KEY}\" | base64 -d | ssh-add -"
|
||||||
|
- "ssh $${ORIGIN%:*}"
|
||||||
|
- "git config user.name Woodpecker"
|
||||||
|
- "git config user.email ci@sutty.coop.ar"
|
||||||
|
- "git remote add upstream $${ORIGIN}"
|
||||||
|
- "git checkout -B ${CI_COMMIT_BRANCH}"
|
||||||
|
- "mv config/credentials.yml.enc.ci config/credentials.yml.enc"
|
||||||
|
- "yarn"
|
||||||
|
- "cp .env.example .env"
|
||||||
|
- "dotenv bundle install --path=vendor"
|
||||||
|
- "dotenv RAILS_ENV=production bundle exec rails webpacker:clobber"
|
||||||
|
- "dotenv RAILS_ENV=production bundle exec rails assets:precompile"
|
||||||
|
- "dotenv RAILS_ENV=production bundle exec rails assets:clean"
|
||||||
|
- "find public -type f -print0 | xargs -r0 brotli -k9f"
|
||||||
|
- "git add public && git commit -m \"ci: assets [skip ci]\""
|
||||||
|
- "git pull upstream ${CI_COMMIT_BRANCH}"
|
||||||
|
- "git push upstream ${CI_COMMIT_BRANCH}"
|
||||||
|
secrets:
|
||||||
|
- "SSH_KEY"
|
||||||
|
- "KNOWN_HOSTS"
|
||||||
|
- "ORIGIN"
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- "rails"
|
||||||
|
- "panel.sutty.nl"
|
||||||
|
path:
|
||||||
|
include:
|
||||||
|
- "app/assets/**/*"
|
||||||
|
- "app/javascript/**/*"
|
||||||
|
- "package.json"
|
||||||
|
- "yarn.lock"
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- ALPINE_VERSION: "3.14.10"
|
||||||
|
RUBY_VERSION: "2.7"
|
||||||
|
RUBY_PATCH: "8"
|
10
Dockerfile
10
Dockerfile
|
@ -1,5 +1,9 @@
|
||||||
FROM registry.nulo.in/sutty/rails:3.13.6-2.7.5
|
ARG RUBY_VERSION=2.7
|
||||||
ARG PANDOC_VERSION=2.17.1.1
|
ARG RUBY_PATCH=6
|
||||||
|
ARG ALPINE_VERSION=3.13.10
|
||||||
|
ARG BASE_IMAGE=registry.nulo.in/sutty/rails
|
||||||
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
|
||||||
|
ARG PANDOC_VERSION=2.18
|
||||||
ENV RAILS_ENV production
|
ENV RAILS_ENV production
|
||||||
|
|
||||||
# Instalar las dependencias, separamos la librería de base de datos para
|
# Instalar las dependencias, separamos la librería de base de datos para
|
||||||
|
@ -10,7 +14,7 @@ ENV RAILS_ENV production
|
||||||
# principal
|
# principal
|
||||||
RUN apk add --no-cache libxslt libxml2 postgresql-libs libssh2 \
|
RUN apk add --no-cache libxslt libxml2 postgresql-libs libssh2 \
|
||||||
rsync git jpegoptim vips tectonic oxipng git-lfs openssh-client \
|
rsync git jpegoptim vips tectonic oxipng git-lfs openssh-client \
|
||||||
yarn daemonize ruby-webrick
|
yarn daemonize ruby-webrick postgresql-client dateutils file
|
||||||
|
|
||||||
RUN gem install --no-document --no-user-install foreman
|
RUN gem install --no-document --no-user-install foreman
|
||||||
RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -O - | tar --strip-components 1 -xvzf - pandoc-${PANDOC_VERSION}/bin/pandoc && mv /bin/pandoc /usr/bin/pandoc
|
RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -O - | tar --strip-components 1 -xvzf - pandoc-${PANDOC_VERSION}/bin/pandoc && mv /bin/pandoc /usr/bin/pandoc
|
||||||
|
|
1
config/credentials.yml.enc.ci
Normal file
1
config/credentials.yml.enc.ci
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1jEfzfldP9tT4+HWfhP48I9hw31gYCnnxHWpYjPrcTm/pgkFdiG+mDa6y31EOxzs50w6FEw2GO127BnyBSUIPIxuWY0cR96xL5pVrS3vjyzM84QN4lJF9ER0Tz1AQ9S7NJ54CelSkMfFt/rf+O4YM8cLtdSVsVC/HlGbp16p3D1pm4MFo5cQb0hEmlyyYlzEn4oJtsp/MCIwI4+z8oFhxKdMIxdbiw+KS/7PBRfMm1h5rdGORCnD69iVmnXseMvVtZn9A7N7uR6+gFlhxlD5yyEW0pwTj3tbu9NeIOVbtmYOL5ZhLW9REXtGTqR5Op/LN+ukIXbDNEScKltJXUdWfa9Pd/QjVT8IMURZ04POEMDgs1cw363yz4f+WQForhSco9oYLDOd5hTGRXoZ9fnjnfJSTjINM62hkfDY3w3+s844nNbjbj+lPTJHU/QjRhcuNqBDDxWUfwTmRIqm5zrelnHnZnuFmFwCNet6NChC6EFUAFjrals6kTSQllyMt4xImqA+HL7DnjWj6VURSH+nGQTA4tQvDdfbDwTzg/PvRkJcsy2dRd135RQdmRZ+8KXBviLabwdR256vaCqSO1j+jyeUPGLll35ghyLxncyBkkAKt1zaDRPDWgVafg0gJ3v7hVV5TYgToPzlv4w88KPCY7cBhkb1qGoXAhtO6iAuZYK9eyZd1gNQJKyqbcLqA5aTTX/ylfdbptWhaZ8ibB8KBgVyn2RmrOHEhB38rDSMHHNfK3Xs4/hhqMFIGHGTGCUYVmjCzhVFd15yRurU32d3YtP8W4L77H7qkFsF1gnvsZx+R084LcJqknwY94dmjtUE4x2u+Qh3ElFj--lr8JoUq1WH9xXNsB--mE8hxHADL7SbDWabAPY1+Q==
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sutty",
|
"name": "sutty",
|
||||||
|
"author": "Sutty <hi@sutty.nl>",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@airbrake/browser": "^1.4.1",
|
"@airbrake/browser": "^1.4.1",
|
||||||
|
|
Loading…
Reference in a new issue