Browse Source
Merge pull request #1992 from doccano/enhancement/buildImagesForDockerCompose
[Enhancement] Use pre-build images to avoid building images in docker-compose
pull/1994/head
Hiroki Nakayama
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
22 additions and
16 deletions
-
.github/workflows/publish-image.yml
-
docker/docker-compose.prod.yml
|
|
@ -45,3 +45,21 @@ jobs: |
|
|
|
push: ${{ github.event_name != 'pull_request' }} |
|
|
|
tags: ${{ steps.docker_meta.outputs.tags }} |
|
|
|
labels: ${{ steps.docker_meta.outputs.labels }} |
|
|
|
|
|
|
|
- name: Build a backend image and push |
|
|
|
uses: docker/build-push-action@v3 |
|
|
|
with: |
|
|
|
context: . |
|
|
|
file: ./docker/Dockerfile.prod |
|
|
|
push: ${{ github.event_name != 'pull_request' }} |
|
|
|
tags: doccano/doccano:backend |
|
|
|
labels: ${{ steps.docker_meta.outputs.labels }} |
|
|
|
|
|
|
|
- name: Build a frontend image and push |
|
|
|
uses: docker/build-push-action@v3 |
|
|
|
with: |
|
|
|
context: . |
|
|
|
file: ./docker/Dockerfile.nginx |
|
|
|
push: ${{ github.event_name != 'pull_request' }} |
|
|
|
tags: doccano/doccano:frontend |
|
|
|
labels: ${{ steps.docker_meta.outputs.labels }} |
|
|
@ -2,10 +2,7 @@ version: "3.7" |
|
|
|
services: |
|
|
|
|
|
|
|
backend: |
|
|
|
build: |
|
|
|
context: .. |
|
|
|
dockerfile: docker/Dockerfile.prod |
|
|
|
image: doccano_backend:prod |
|
|
|
image: doccano/doccano:backend |
|
|
|
volumes: |
|
|
|
- static_volume:/backend/staticfiles |
|
|
|
- media:/backend/media |
|
|
@ -26,10 +23,7 @@ services: |
|
|
|
- network-frontend |
|
|
|
|
|
|
|
celery: |
|
|
|
build: |
|
|
|
context: .. |
|
|
|
dockerfile: docker/Dockerfile.prod |
|
|
|
image: doccano_celery:prod |
|
|
|
image: doccano/doccano:backend |
|
|
|
volumes: |
|
|
|
- media:/backend/media |
|
|
|
- tmp_file:/backend/filepond-temp-uploads |
|
|
@ -46,10 +40,7 @@ services: |
|
|
|
- network-backend |
|
|
|
|
|
|
|
flower: |
|
|
|
build: |
|
|
|
context: .. |
|
|
|
dockerfile: docker/Dockerfile.prod |
|
|
|
image: doccano_flower:prod |
|
|
|
image: doccano/doccano:backend |
|
|
|
entrypoint: ["/opt/bin/prod-flower.sh"] |
|
|
|
environment: |
|
|
|
PYTHONUNBUFFERED: "1" |
|
|
@ -76,10 +67,7 @@ services: |
|
|
|
- network-backend |
|
|
|
|
|
|
|
nginx: |
|
|
|
build: |
|
|
|
context: .. |
|
|
|
dockerfile: docker/Dockerfile.nginx |
|
|
|
image: doccano_nginx:prod |
|
|
|
image: doccano/doccano:frontend |
|
|
|
command: > |
|
|
|
/bin/sh -c |
|
|
|
"envsubst ' |
|
|
|