Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nut-upsd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Docker
nut-upsd
Commits
1eb58280
Commit
1eb58280
authored
5 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Container progress
parent
f6b4d6b7
Branches
Branches containing commit
No related tags found
1 merge request
!1
MVP
Pipeline
#1843
passed
5 years ago
Stage: test
Stage: deploy
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
.gitlab-ci.yml
+4
-13
4 additions, 13 deletions
.gitlab-ci.yml
context/Dockerfile
+3
-2
3 additions, 2 deletions
context/Dockerfile
context/entrypoint
+19
-0
19 additions, 0 deletions
context/entrypoint
docker-compose.yml
+5
-16
5 additions, 16 deletions
docker-compose.yml
with
32 additions
and
31 deletions
.gitignore
+
1
−
0
View file @
1eb58280
.idea
.idea
*.iml
*.iml
config/*.conf
config/*.conf
config/*.users
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
4
−
13
View file @
1eb58280
...
@@ -25,8 +25,7 @@ lint:shell-script:
...
@@ -25,8 +25,7 @@ lint:shell-script:
before_script
:
before_script
:
-
shellcheck -V
-
shellcheck -V
script
:
script
:
# - shellcheck ./context/s3-purge.sh
-
shellcheck ./context/entrypoint
-
exit
0
#
#
# IMAGE BUILDS/PUSHES
# IMAGE BUILDS/PUSHES
...
@@ -41,18 +40,10 @@ build:master:
...
@@ -41,18 +40,10 @@ build:master:
-
master
-
master
when
:
manual
when
:
manual
build:dev
-amd64
:
build:dev
:
stage
:
deploy
stage
:
deploy
script
:
script
:
-
docker build --build-arg opts="CGO_ENABLED=0 GOARCH=amd64" --pull -t "$CI_REGISTRY_IMAGE:dev-amd64" ./context/
-
docker build --pull -t "$CI_REGISTRY_IMAGE:dev" ./context/
# - docker push "$CI_REGISTRY_IMAGE:dev-amd64"
# - docker push "$CI_REGISTRY_IMAGE:dev"
except
:
-
master
build:dev-arm7
:
stage
:
deploy
script
:
-
docker build --build-arg opts="GOARCH=arm GOARM=7" --pull -t "$CI_REGISTRY_IMAGE:dev-arm7" ./context/
# - docker push "$CI_REGISTRY_IMAGE:dev-arm7"
except
:
except
:
-
master
-
master
This diff is collapsed.
Click to expand it.
context/Dockerfile
+
3
−
2
View file @
1eb58280
...
@@ -12,6 +12,7 @@ RUN apt-get update \
...
@@ -12,6 +12,7 @@ RUN apt-get update \
&&
apt-get clean
\
&&
apt-get clean
\
&&
rm
-rf
/var/lib/apt/lists/
*
&&
rm
-rf
/var/lib/apt/lists/
*
# TODO: entrypoint?
EXPOSE
3493
EXPOSE
3493
COPY
entrypoint /usr/local/bin/
ENTRYPOINT
["entrypoint"]
This diff is collapsed.
Click to expand it.
context/entrypoint
0 → 100755
+
19
−
0
View file @
1eb58280
#!/bin/bash
CONFIG_SOURCE
=
"/opt/nut-config"
export
CONFIG_SOURCE
CONFIG_DEST
=
"/etc/nut"
export
CONFIG_DEST
echo
"Copying configurations from
${
CONFIG_SOURCE
}
to
${
CONFIG_DEST
}
..."
find
$CONFIG_SOURCE
-name
"*.conf"
-exec
cp
'{}'
$CONFIG_DEST
\;
echo
"Restarting services..."
upsdrvctl start
/etc/init.d/nut-server restart
echo
"Ready on port 3493"
tail
-F
/dev/null
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
5
−
16
View file @
1eb58280
version
:
"
3.7"
version
:
"
3.7"
services
:
services
:
nut
:
nut
:
#
image:
containers.ethitter.com:443/docker/s3-object-expirer
:latest
image
:
nut-upsd
:latest
build
:
build
:
context
:
./context
context
:
./context
ports
:
-
3493:3493
restart
:
unless-stopped
restart
:
unless-stopped
# TODO: mount a dir
volumes
:
# secrets:
-
./config/:/opt/nut-config
# - source: s3_config
# target: /s3_config
# - source: s3_bucket
# target: /s3_bucket
# - source: s3_expire_days
# target: /s3_expire_days
#secrets:
# s3_config:
# file: ./config/.s3cfg
# s3_bucket:
# file: ./config/bucket
# s3_expire_days:
# file: ./config/expire_age_days
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment