Skip to content
Snippets Groups Projects
Commit 1eb58280 authored by Erick Hitter's avatar Erick Hitter
Browse files

Container progress

parent f6b4d6b7
No related branches found
No related tags found
1 merge request!1MVP
Pipeline #1843 passed
.idea
*.iml
config/*.conf
config/*.users
......@@ -25,8 +25,7 @@ lint:shell-script:
before_script:
- shellcheck -V
script:
# - shellcheck ./context/s3-purge.sh
- exit 0
- shellcheck ./context/entrypoint
#
# IMAGE BUILDS/PUSHES
......@@ -41,18 +40,10 @@ build:master:
- master
when: manual
build:dev-amd64:
build:dev:
stage: deploy
script:
- docker build --build-arg opts="CGO_ENABLED=0 GOARCH=amd64" --pull -t "$CI_REGISTRY_IMAGE:dev-amd64" ./context/
# - docker push "$CI_REGISTRY_IMAGE:dev-amd64"
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"
- docker build --pull -t "$CI_REGISTRY_IMAGE:dev" ./context/
# - docker push "$CI_REGISTRY_IMAGE:dev"
except:
- master
......@@ -12,6 +12,7 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# TODO: entrypoint?
EXPOSE 3493
COPY entrypoint /usr/local/bin/
ENTRYPOINT ["entrypoint"]
#!/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
version: "3.7"
services:
nut:
#image: containers.ethitter.com:443/docker/s3-object-expirer:latest
image: nut-upsd:latest
build:
context: ./context
ports:
- 3493:3493
restart: unless-stopped
# TODO: mount a dir
# secrets:
# - 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
volumes:
- ./config/:/opt/nut-config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment