root: attempt to build static image without django's collectstatic (#360)

* root: attempt to build static image without django's collectstatic

* web: move static dockerfile to /web

* web: fix dockerfile path

* web: improve image size by not copying node_modules
This commit is contained in:
Jens L
2020-12-02 21:23:07 +01:00
committed by GitHub
parent c17623323a
commit 6164db5a18
9 changed files with 48 additions and 97 deletions

View File

@ -45,7 +45,7 @@ jobs:
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- name: Building Docker Image
run: |
cd proxy
cd proxy/
docker build \
--no-cache \
-t beryju/passbook-proxy:0.12.11-stable \
@ -57,15 +57,6 @@ jobs:
run: docker push beryju/passbook-proxy:latest
build-static:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: passbook
POSTGRES_USER: passbook
POSTGRES_PASSWORD: "EK-5jnKfjrGRm<77"
redis:
image: redis:latest
steps:
- uses: actions/checkout@v1
- name: Docker Login Registry
@ -74,12 +65,13 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- name: Building Docker Image
run: docker build
--no-cache
--network=$(docker network ls | grep github | awk '{print $1}')
-t beryju/passbook-static:0.12.11-stable
-t beryju/passbook-static:latest
-f static.Dockerfile .
run: |
cd web/
docker build \
--no-cache \
-t beryju/passbook-static:0.12.11-stable \
-t beryju/passbook-static:latest \
-f Dockerfile .
- name: Push Docker Container to Registry (versioned)
run: docker push beryju/passbook-static:0.12.11-stable
- name: Push Docker Container to Registry (latest)