-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and update container builds
- Build and run test suites using docker compose - Create and publish a Docker image - Remove TravisCI - Move Dockerfile to root and update to use AlmaLinux 8 - Update bower deps to latest - flake8 fixes - Refactor and update composer config - Deploy using gunicorn - Update requirements.txt to latest that support python2 - Create entrypoint.sh script to unify how the container is deployed Signed-off-by: Lance Albertson <[email protected]>
- Loading branch information
Showing
20 changed files
with
320 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: Build and run tests | ||
on: [push] | ||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build container | ||
run: | | ||
mkdir media | ||
cp env.dist .env | ||
echo STREAMWEBS_TEST=1 >> .env | ||
cp streamwebs_frontend/streamwebs_frontend/settings.py.dist streamwebs_frontend/streamwebs_frontend/settings.py | ||
docker compose build | ||
- name: Start Postgresql | ||
run: | | ||
docker compose up -d postgres_host | ||
- name: Run tests | ||
run: | | ||
docker compose up web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: Create and publish a Docker image | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM almalinux:8 | ||
|
||
RUN dnf -y install epel-release | ||
RUN dnf config-manager --set-enabled powertools | ||
RUN dnf -y install proj postgresql postgresql-devel nodejs npm wget \ | ||
freetype-devel libjpeg-devel libpng-devel python2-pip python2-devel gcc git \ | ||
gdal-devel gcc-c++ | ||
RUN ln -s /usr/bin/python2 /usr/bin/python | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
COPY . /usr/src/app | ||
|
||
RUN npm install -g bower | ||
RUN bower install --allow-root | ||
RUN pip2 install -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"name": "streamwebs", | ||
"dependencies": { | ||
"jquery": "^2.2.3", | ||
"d3": "4.2.1", | ||
"materialize": "^0.97.7" | ||
"jquery": "^3.7.1", | ||
"d3": "5.16.0", | ||
"materialize": "^1.0.0" | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.