Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mseed #54

Draft
wants to merge 26 commits into
base: mseed
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: dockerized tests

on:
push:
branches:
- master
- mseed
pull_request:
branches:
- master
- mseed


jobs:
Docker-build-and-push:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Build and push base
id: docker_build_base
uses: docker/build-push-action@v2
with:
context: ./
file: ./base/amd64/Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/orcabase:latest

- name: Build and push mseed
id: docker_build_mseed
uses: docker/build-push-action@v2
with:
context: ./
file: ./mseed/Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/orcamseed:latest

Docker-container:
needs: Docker-build-and-push
runs-on: ubuntu-20.04
steps:
- name: start containers
env:
AWSACCESSKEYID: ${{ secrets.AWSACCESSKEYID }}
AWSSECRETACCESSKEY: ${{ secrets.AWSSECRETACCESSKEY }}
TIME_PREFIX: ${{ secrets.TIME_PREFIX }}
DELAY_SEGMENT: ${{ secrets.DELAY_SEGMENT }}
NODE_NAME: ${{ secrets.NODE_NAME }}
NODE_LOOPBACK: ${{ secrets.NODE_LOOPBACK}}
ENV: ${{ secrets.ENV }}
run: docker run --name fetch_container karan2704/orcamseed:latest

- name: run functions
run: docker exec -w /bin/bash fetch_container ooipypull.py

- name: clean up containers
run: docker kill $(docker ps -q)

22 changes: 0 additions & 22 deletions .github/workflows/docker-test.yml

This file was deleted.

34 changes: 34 additions & 0 deletions base/amd64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,37 @@ MAINTAINER Orcasound <[email protected]>

RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg


RUN apt-get update && apt-get install -y --no-install-recommends \
# General tools
htop \
nano \
sox \
tmux \
wget \
curl \
git

# Upgrade OS
RUN apt-get update && apt-get upgrade -y -o Dpkg::Options::="--force-confold"

# Set default command to bash as a placeholder
CMD ["/bin/bash"]

# Make sure we're the root user
USER root

WORKDIR /root


############################### Install boto and inotify libraies ###################################

RUN apt-get update && apt-get install -y python3-pip
RUN pip3 install -U boto3 inotify

############################## Copy common scripts ##################################################

COPY . .

# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2 changes: 1 addition & 1 deletion mseed/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Docker currently has a bug where armel is used instead when relying on
# multiarch manifest: https://github.com/moby/moby/issues/34875
# When this is fixed, this can be changed to just `FROM debian:stretch-slim`
FROM orcastream/orcabase:latest
FROM karan2704/orcabase-amd64:latest
MAINTAINER Orcasound <[email protected]>

RUN pip3 install numpy
Expand Down
4 changes: 2 additions & 2 deletions mseed/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
# command: tail -F README.md
command: python ooipypull.py
restart: always
env_file: .env
#env_file: .env
volumes:
- data:/tmp
depends_on:
Expand All @@ -17,7 +17,7 @@ services:
build: ./
command: ./streamfiles.sh
restart: always
env_file: .env
#env_file: .env
volumes:
- data:/tmp
privileged: true
Expand Down