mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Use docker compose to start and stop containers which match directly to our command overrides
This commit is contained in:
		
							
								
								
									
										19
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							@@ -81,15 +81,6 @@ jobs:
 | 
			
		||||
      matrix:
 | 
			
		||||
        python-version: ['3.8', '3.9', '3.10']
 | 
			
		||||
      fail-fast: false
 | 
			
		||||
    services:
 | 
			
		||||
      tika:
 | 
			
		||||
        image: ghcr.io/paperless-ngx/tika:latest
 | 
			
		||||
        ports:
 | 
			
		||||
          - "9998:9998/tcp"
 | 
			
		||||
      gotenberg:
 | 
			
		||||
        image: docker.io/gotenberg/gotenberg:7.6
 | 
			
		||||
        ports:
 | 
			
		||||
          - "3000:3000/tcp"
 | 
			
		||||
    env:
 | 
			
		||||
      # Enable Tika end to end testing
 | 
			
		||||
      TIKA_LIVE: 1
 | 
			
		||||
@@ -103,6 +94,11 @@ jobs:
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
      -
 | 
			
		||||
        name: Start containers
 | 
			
		||||
        run: |
 | 
			
		||||
          docker compose --file ${GITHUB_WORKSPACE}/docker/compose/docker-compose.ci-test.yml pull --quiet
 | 
			
		||||
          docker compose --file ${GITHUB_WORKSPACE}/docker/compose/docker-compose.ci-test.yml up --detach
 | 
			
		||||
      -
 | 
			
		||||
        name: Install pipenv
 | 
			
		||||
        run: |
 | 
			
		||||
@@ -154,6 +150,11 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          cd src/
 | 
			
		||||
          pipenv run coveralls --service=github
 | 
			
		||||
      -
 | 
			
		||||
        name: Stop containers
 | 
			
		||||
        if: always()
 | 
			
		||||
        run: |
 | 
			
		||||
          docker compose --file ${GITHUB_WORKSPACE}/docker/compose/docker-compose.ci-test.yml down
 | 
			
		||||
 | 
			
		||||
  tests-frontend:
 | 
			
		||||
    name: "Tests Frontend"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								docker/compose/docker-compose.ci-test.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docker/compose/docker-compose.ci-test.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
# docker-compose file for running paperless testing with actual gotenberg
 | 
			
		||||
# and Tika containers for a more end to end test of the Tika related functionality
 | 
			
		||||
# Can be used locally or by the CI to start the nessecary containers with the
 | 
			
		||||
# correct networking for the tests
 | 
			
		||||
 | 
			
		||||
version: "3.7"
 | 
			
		||||
services:
 | 
			
		||||
  gotenberg:
 | 
			
		||||
    image: docker.io/gotenberg/gotenberg:7.6
 | 
			
		||||
    hostname: gotenberg
 | 
			
		||||
    container_name: gotenberg
 | 
			
		||||
    network_mode: host
 | 
			
		||||
    restart: unless-stopped
 | 
			
		||||
    command:
 | 
			
		||||
      - "gotenberg"
 | 
			
		||||
      - "--chromium-disable-routes=true"
 | 
			
		||||
  tika:
 | 
			
		||||
    image: ghcr.io/paperless-ngx/tika:latest
 | 
			
		||||
    hostname: tika
 | 
			
		||||
    container_name: tika
 | 
			
		||||
    network_mode: host
 | 
			
		||||
    restart: unless-stopped
 | 
			
		||||
		Reference in New Issue
	
	Block a user