专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

jmessenger/maint-autobuild Docker 镜像 - 轩辕镜像

maint-autobuild
jmessenger/maint-autobuild
自动构建
Autobuilt image for [***]
0 次下载
😎 镜像稳了,发布才敢点回车
镜像简介版本下载
😎 镜像稳了,发布才敢点回车

Introduction

This application is a conversion of the 802.1 Maintenance Database into a web application. The old database was formed from a single Excel workbook with magic formulae to generate static HTML output. It was difficult to maintain and keep error-free.

To modify the application or run it locally in a development environment, some setup is required. However if you just want to run it, you can skip to the "Deploying with Docker Compose" section below.

Installing Rbenv and Ruby

These commands are for Ubuntu. For other setups see [***]

    $ git clone [***] ~/.rbenv
    $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
    $ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    $ git clone [***] ~/.rbenv/plugins/ruby-build
    $ exec -l $SHELL

Then enter "type rbenv" to verify that rbenv is a function. Then install Ruby:

    $ sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev
    $ rbenv install 2.4.2
    $ rbenv global 2.4.2

Perviously, with Ubuntu 14.04 with Ruby 2.2.2 , due to problems with Readline, I found I had to use this incantation to install Ruby:

    $ RUBY_CONFIGURE_OPTS=--with-readline-dir="/usr/include/readline" rbenv install 2.2.2

Other prerequisites

Install the bundler gem and other prerequisites:

    $ gem install bundler
    $ sudo apt-get install postgresql postgresql-client libpq-dev git libicu-dev

Clone the repository and add missing files

Clone the source code from GitHub and install the required gems for the development environment:

    $ git clone [***]
    $ cd maint
    $ bundle install
    $ mkdir public/uploads

Create .env, config/database.yml, config/secrets.yml based on the examples in the repository named "example-...". The title of the site is configured using the COMMITTEE environment variable in the .env file

Set up Postgresql for the development environment

These instructions assume that the name of the Postgres user (called a "role") is "deploy". Also, that your UNX username is "deploy". If those assumptions are invalid, the PostgreSQL setup can be more complicated. It's much simpler if the UNX username and the PostgreSQL role name are the same.

    $ sudo su - postgres
    $ psql
    postgres# create role deploy with createdb login password 'somepassword';
    postgres# \q
    $ createdb -O deploy maint_development          # actually this step should not be necessary, as rake db:setup does it.
    $ exit

    $ rake db:setup

Try it out

At this point you should be able to start the server and connect to it using your web browser at http://localhost:3000/users/sign_in.

    $ rbenv rehash
    $ rails server

Click on "sign up". Follow the instructions. For this to work, your development machine has to have a way to send emails, and the "devise" gem has to be able to use it. This is configured in config/environments/development.rb (see the config.action_mailer.delivery_method entry). If you don't have this set up, you can find the link for the sign-up configuration in the debug output in the terminal window, and enter it directly into the browser. Then, log in to the application using your new username and password.

Here's the hacky bit: the app has no way to create an administrator user, so you have to hack this manually. After creating your user and logging in, stop the server and do the following, substituting the newly created user's email address:

    $ rails console
    irb(main):001:0> u = User.where(*** "***").first
    ...
    irb(main):001:0> u.admin=true
    => true
    irb(main):002:0> u.save
    ...
    => true
    irb(main):003:0> quit
    $ rails server

Now, when logging in to the app or refreshing the page, you should see Administrator options in the top header.

The first real step is to import an existing maintenance database spreadsheet using the Import menu. Then use the Items menu to look at the maintenance database entries.

Preparing the Import file

Importing Excel files into other environments can be a tricky business, because the variety of things that can be in an Excel file is vast. Some files will not import without preparatory clean-up. I have come across two classes of problems: hyperlinks on the Master and Minutes tabs (which should no longer present a problem) and illegal characters in Document Properties. For the latter, save a copy of the spreadsheet in Excel and then do File->Info->Inspect Workbook->Document Properties and Personal Information (just that category). Click "Remove", then save the copy and import it into the app.

Deploying with Capistrano

This Ruby on Rails app is set up to deploy to a server using Capistrano. For instructions and background, see [] also described here, and [] My setup is based on an Ubuntu virtual machine running Nginx and Passenger. (However, it may be better to use Docker, as described below.)

Create .env, config/database.yml, config/secrets.yml based on the examples in the repository named "example-..."

	$ cap production deploy

This step is quite messy, as /var/www/maint has to exist on the deployment server and it doesn't and needs creating with the right permissions (it tries to create it but the /var/www directory which it doesn't own). Then, some special files don't exist and have to be created:

  • ~deploy/maint-secrets/database.yml
  • ~deploy/maint-secrets/secrets.yml

These have to be linked to the right places in the deployment structure:

	$ ln -s /home/deploy/maint-secrets/database.yml /var/www/maint/shared/config/
	$ ln -s /home/deploy/maint-secrets/secrets.yml /var/www/maint/shared/config/
	$ createdb maint_production

Apparently that step isn't automated.

The nginx configuration file is not altered automatically to add the new application, so you have to manually edit /opt/nginx/conf/nginx.conf to add a section for the new app, in the existing server section after the root line. Mine looked like this:

        location ~ ^/maint(/.|$) {
                alias /var/www/maint/current/public$1;
                passenger_base_uri /maint;
                passenger_app_root /var/www/maint/current;
                passenger_document_root /var/www/maint/current/public;
                passenger_enabled on;
        }

Creating a Dockerized version of the app

On the development machine:

    $ docker-compose build
    $ docker tag maint_web:latest yourusername/maint_web:latest
    $ docker push yourusername/maint_web:latest

Deploying with Docker Compose

The preferred method of deploying the application is using Docker Compose. This assumes you have a separate Docker hosting environment. I use an Ubuntu virtual machine for this, with Docker CE installed. Digital Ocean offers a pre-configured setup for this.

On the Docker host (target), first prepare the storage area for the database (there are lots of other, perhaps better ways to do this, including using a persistent docker volume):

bash
    $ sudo mkdir -p /srv/docker/postgresql/data
    $ sudo chmod -R go-rwx /srv
    $ sudo chown 999.root /srv/docker/postgresql/data

Then copy example-deploy-docker-compose.yml to deploy-docker-compose.yml and edit it to configure the application. The POSTGRES_USER and POSTGRES_PASSWORD fields can be set arbitrarily (but must be the same for the db and web sections). The SECRET_KEY_BASE and DEVISE_PEPPER entries are Rails secret keys, and can be generated using openssl rand -hex 64 or rake secret (if you happened to have Rake installed). The VIRTUAL_HOST and LETSENCRYPT* entries are only required if you are using Jason Wilder's nginx-proxy and Yves Blusseau's docker-letsencrypt-nginx-proxy-companion (see section below). The remaining fields configure aspects of the user interface that depend on the use you are putting this project to.

Once the Docker Compose file has been customised, the application can be launched with the command

    $ docker-compose -f deploy-docker-compose.yml up

It takes a couple of minutes to initialise, set up the database and write cache files. Test it by navigating to localhost:80. To terminate, press Control-C. To launch it in the background, use

bash
    $ docker-compose -f deploy-docker-compose.yml up -d

Enhancing the Docker Compose method to add HTTPS and a proxy server

Jason Wilder has written a very fine reverse proxy for Docker containers based on Nginx. Yves Blusseau has written an excellent companion utility which automatically generates, applies (and renews) Let's Encrypt certificates to each virtual host created by the above. No account or additional setup is needed.

With a few simple steps, this allows multiple Dockerized web applications to run on the same VM, each as different virtual hosts, secured by valid certificates and supporting HTTPS without the web application having to be HTTPS-aware. Adding a new application requires no configuration beyond including the VIRTUAL_HOST, LETSENCRYPT_HOST and LETSENCRYPT_EMAIL environment variables to the environment of the new container.

To apply this to the maint application, first register the newly invented DNS name of the web application virtual host to be a CNAME of the Docker host. Then, before starting the web application with Docker Compose as described in the previous section, run these commands:

      $ sudo mkdir /web/nginx-proxy
      $ sudo chown YOU /web/nginx-proxy
      $ curl [***] > /web/nginx-proxy/nginx.tmpl
      # Probably you need to patch nginx.tmpl to stop redirects to HTTPS for the letsencrypt verification files:
      $ wget -Onginx.tmpl.patch [***]
      $ patch /web/nginx-proxy/nginx.tmpl < nginx.tmpl.patch
      $ sudo docker network create nginx-proxy
      
      $ sudo docker run -d -p 80:80 -p 443:443 --name nginx-proxy --net nginx-proxy --restart=always -v /web/nginx-proxy:/etc/nginx/certs:ro  -v /etc/nginx/vhost.d     -v /usr/share/nginx/html -v /var/run/docker.sock:/tmp/docker.sock:ro  --label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy jwilder/nginx-proxy
      $ sudo docker run -d --name nginx-letsencrypt --net nginx-proxy --restart=always -v /web/nginx-proxy:/etc/nginx/certs:rw -v /var/run/docker.sock:/var/run/docker.sock:ro --volumes-from nginx-proxy jrcs/letsencrypt-nginx-proxy-companion

Deploying with Docker Cloud (deprecated)

Docker Cloud was a cloud-based Docker stack manager. It is gone, now. Sadface.

Another way of deploying the application is using Docker, managed with a service such as Docker Cloud. Once debugged, this provides a very convenient deployment environment. My setup for this involved providing my own node to the Docker Cloud service.

    $ docker-compose build
    $ docker tag maint_web:latest yourusername/maint_web:latest
    $ docker push yourusername/maint_web:latest

Then navigate to the "Stacks" tab in Docker Cloud, and select "Create Stack" and upload example-docker-cloud-stack.yml. Edit as appropriate. Then "Deploy" it!

查看更多 maint-autobuild 相关镜像 →
sitespeedio/sitespeed.io-autobuild logo
sitespeedio/sitespeed.io-autobuild
sitespeed.io是一款完整的Web性能工具,通过真实浏览器测试网站,收集用户中心指标,提供优化建议,支持持续集成和生产环境监控。
6500K+ pulls
上次更新:未知
rocm/tensorflow-autobuilds logo
rocm/tensorflow-autobuilds
用于构建最新TensorFlow Docker镜像的仓库
450K+ pulls
上次更新:未知
tractusx/portal-maintenance-service logo
tractusx/portal-maintenance-service
Eclipse Tractus-X Portal Checklist Worker的Docker镜像,基于.NET 9.0 Alpine运行时,用于Portal后端的检查清单工作处理,遵循Apache License 2.0许可。
10K+ pulls
上次更新:未知
alfiilham26/mainten logo
alfiilham26/mainten
暂无描述
10K+ pulls
上次更新:未知
linn/products-maint logo
linn/products-maint
暂无描述
10K+ pulls
上次更新:未知
jorenn92/maintainerr logo
jorenn92/maintainerr
Maintainerr是一款媒体管理工具,帮助用户清理服务器上未被观看的闲置媒体,通过配置自定义规则自动处理来自Plex、Overseerr、Radarr和Sonarr的影视内容,释放存储空间,解决媒体管理难题。
5500K+ pulls
上次更新:未知

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
jmessenger/maint-autobuild
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.