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

Container progress

parent f6b4d6b7
Branches
No related tags found
1 merge request!1MVP
Pipeline #1843 passed
.idea .idea
*.iml *.iml
config/*.conf config/*.conf
config/*.users
...@@ -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
...@@ -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"]
#!/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" 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment