mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-25 22:25:40 +03:00
status deleted
This commit is contained in:
parent
5adc593180
commit
259591579a
11
.travis.yml
11
.travis.yml
@ -748,11 +748,12 @@ matrix:
|
|||||||
# - docker build --compress -t epicmorg/repo:tag path/to/folder
|
# - docker build --compress -t epicmorg/repo:tag path/to/folder
|
||||||
# - docker push epicmorg/repo:tag
|
# - docker push epicmorg/repo:tag
|
||||||
|
|
||||||
- name: Staytus
|
#### Deprecated
|
||||||
script:
|
# - name: Staytus
|
||||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
# script:
|
||||||
- docker build --compress -t epicmorg/staytus:latest staytus
|
# - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||||
- docker push epicmorg/staytus:latest
|
# - docker build --compress -t epicmorg/staytus:latest staytus
|
||||||
|
# - docker push epicmorg/staytus:latest
|
||||||
|
|
||||||
- name: qBitTorrent - latest
|
- name: qBitTorrent - latest
|
||||||
script:
|
script:
|
||||||
|
@ -1 +0,0 @@
|
|||||||
repository: epicmorg/staytus
|
|
@ -1,3 +0,0 @@
|
|||||||
.git
|
|
||||||
scripts
|
|
||||||
.idea
|
|
@ -1,30 +0,0 @@
|
|||||||
FROM ruby:buster
|
|
||||||
LABEL maintainer="Tim Perry <pimterry@gmail.com>; EpicMorg DevTeam, developer@epicm.org"
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
COPY --from=epicmorg/prod /etc/locale.gen /etc/locale.gen
|
|
||||||
COPY --from=epicmorg/prod /etc/apt/sources.list /etc/apt/sources.list
|
|
||||||
COPY --from=epicmorg/prod /etc/apt/trusted.gpg.d/deb-multimedia-keyring.gpg /etc/apt/trusted.gpg.d/deb-multimedia-keyring.gpg
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
RUN apt update && \
|
|
||||||
apt dist-upgrade -y && \
|
|
||||||
# node as the JS engine for uglifier
|
|
||||||
apt-get install -y nodejs git && \
|
|
||||||
gem install bundler && \
|
|
||||||
rm -rfv /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
RUN cd /opt && \
|
|
||||||
git clone https://github.com/adamcooke/staytus.git staytus && \
|
|
||||||
cd /opt/staytus && \
|
|
||||||
bundle install --deployment --without development:test
|
|
||||||
|
|
||||||
# Persists copies of other relevant files (DB config, custom themes). Contents of this are copied
|
|
||||||
# to the relevant places each time the container is started
|
|
||||||
VOLUME /opt/staytus/persisted
|
|
||||||
|
|
||||||
EXPOSE 5000
|
|
||||||
|
|
||||||
ENTRYPOINT /entrypoint.sh
|
|
@ -1,4 +0,0 @@
|
|||||||
all: st
|
|
||||||
|
|
||||||
st:
|
|
||||||
docker build --compress -t epicmorg/staytus:latest .
|
|
@ -1,37 +0,0 @@
|
|||||||
## Info
|
|
||||||
This is a custom improved image from this [original repository](https://github.com/adamcooke/staytus).
|
|
||||||
|
|
||||||
## How to
|
|
||||||
* Install databese and setup user
|
|
||||||
* Install container and connect to database
|
|
||||||
* dont forget about static files! `/opt/staytus/public/assets`
|
|
||||||
|
|
||||||
## Compose example
|
|
||||||
|
|
||||||
```yml
|
|
||||||
version: '3.7'
|
|
||||||
services:
|
|
||||||
mysql:
|
|
||||||
container_name: mysql
|
|
||||||
image: mysql:5.7
|
|
||||||
restart: always
|
|
||||||
staytus:
|
|
||||||
container_name: staytus
|
|
||||||
image: epicmorg/staytus
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- "5000:5000"
|
|
||||||
volumes:
|
|
||||||
- staytus-persisted:/opt/staytus/persisted
|
|
||||||
environment:
|
|
||||||
- DB_USER=root
|
|
||||||
- DB_PASSWORD=password
|
|
||||||
- DB_HOST=mysql #(dns or ip)
|
|
||||||
depends_on:
|
|
||||||
- mysql
|
|
||||||
tmpfs:
|
|
||||||
- /tmp
|
|
||||||
volumes:
|
|
||||||
staytus-persisted:
|
|
||||||
external: true
|
|
||||||
```
|
|
@ -1,39 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
: ${DB_USER:=root}
|
|
||||||
: ${DB_PASSWORD:=root}
|
|
||||||
: ${DB_DATABSE:=staytus}
|
|
||||||
: ${DB_HOST:=127.0.0.1}
|
|
||||||
#: ${DB_PORT:=3306}
|
|
||||||
|
|
||||||
cd /opt/staytus
|
|
||||||
|
|
||||||
# Configure DB with random password, if not already configured
|
|
||||||
if [ ! -f /opt/staytus/persisted/config/database.yml ]; then
|
|
||||||
export DB_PASSWORD=${DB_PASSWORD}
|
|
||||||
|
|
||||||
mysqladmin -u root -ptemp-password password ${DB_PASSWORD}
|
|
||||||
echo "CREATE DATABASE staytus CHARSET utf8 COLLATE utf8_unicode_ci" | mysql -u root -p${DB_PASSWORD}
|
|
||||||
|
|
||||||
cp config/database.example.yml config/database.yml
|
|
||||||
sed -i "s/username:.*/username: ${DB_USER}/" config/database.yml
|
|
||||||
sed -i "s|password:.*|password: ${DB_PASSWORD}|" config/database.yml
|
|
||||||
sed -i "s|host:.*|host: ${DB_HOST}|" config/database.yml
|
|
||||||
sed -i "s|database:.*|database: ${DB_DATABSE}|" config/database.yml
|
|
||||||
|
|
||||||
# Copy the config to persist it, and later copy back on each start, to persist this config file
|
|
||||||
# without persisting all of /config (which is mostly app code)
|
|
||||||
mkdir /opt/staytus/persisted/config
|
|
||||||
cp config/database.yml /opt/staytus/persisted/config/database.yml
|
|
||||||
|
|
||||||
bundle exec rake staytus:build staytus:install
|
|
||||||
else
|
|
||||||
# Use the previously saved config from the persisted volume
|
|
||||||
cp /opt/staytus/persisted/config/database.yml config/database.yml
|
|
||||||
# TODO also copy themes back and forth too
|
|
||||||
|
|
||||||
# If already configured, check if there are any migrations to run
|
|
||||||
bundle exec rake staytus:build staytus:upgrade
|
|
||||||
fi
|
|
||||||
|
|
||||||
bundle exec foreman start
|
|
Loading…
Reference in New Issue
Block a user