Skip to content

Commit

Permalink
Merge pull request #31 from Der-Henning/dev
Browse files Browse the repository at this point in the history
Version 0.3
  • Loading branch information
Der-Henning authored Jan 27, 2022
2 parents a56bb7d + 645c411 commit 78c2851
Show file tree
Hide file tree
Showing 49 changed files with 1,141 additions and 1,060 deletions.
13 changes: 10 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ COPY ./crawler/requirements.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
&& rm -rf /tmp/pip-tmp

RUN mkdir /cache && chown vscode /cache
RUN mkdir /cache && chown vscode /cache
VOLUME /cache

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends nginx \
&& rm /etc/nginx/sites-enabled/*

COPY ./nginx/* /etc/nginx/sites-enabled/

COPY ./docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
7 changes: 4 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Developement Container",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"workspaceFolder": "/usr/mopsy",

// Set *default* container specific settings.json values on container create.
"settings": {
Expand Down Expand Up @@ -39,11 +39,12 @@
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"ms-python.python",
"ms-python.vscode-pylance"
"ms-python.vscode-pylance",
"redhat.vscode-xml"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000, 4000, 5000, "db:5432", "solr:8983"],
"forwardPorts": [3000, 4000, 5000, 80, "db:5432", "solr:8983"],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",
Expand Down
8 changes: 5 additions & 3 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ services:
PYTHON_VERSION: "3.10"
NODE_VERSION: 16
volumes:
- ..:/workspace:cached
- ..:/usr/mopsy:cached
- cache:/cache
environment:
DANGEROUSLY_DISABLE_HOST_CHECK: "true"
DANGEROUSLY_DISABLE_HOST_CHECK: 'true'
FLASK_ENV: developement
DEBUG: 'true'
MOPSY_CRAWLERS: "localhost:5000"
MOPSY_DB_PASSWORD: myverygoodpassword
CALIBRE_PATH: /workspace/calibre-library
CALIBRE_PATH: /usr/mopsy/calibre-library
CRAWLER_AUTORESTART: 'false'
CRAWLER_AUTOSTART: 'false'
CRAWLER_PORT: 5000
Expand Down
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules
*/build*
*/node_modules*
*/node_modules*
/calibre-library
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ master, dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/docker-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish Docker dev Image

on:
push:
branches:
- dev

jobs:
release:
name: Release Image
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image: [ 'mopsy', 'mopsy-crawler' ]
steps:
-
name: Checkout
uses: actions/checkout@v1
-
name: Set Release Tag
run: |
echo "RELEASE_TAG=dev" >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build and push image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile.${{ matrix.image }}
platforms: linux/amd64
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/${{ matrix.image }}:${{ env.RELEASE_TAG }}
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Node.js CI

on:
push:
branches: [ master ]
branches: [ master, dev ]
pull_request:
branches: [ master ]

Expand Down
Loading

0 comments on commit 78c2851

Please sign in to comment.