Create docker-compose.yml #17
This file contains hidden or 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
| name: Docker Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build Docker image | |
| run: docker build . --file Dockerfile --tag video-downloader:$(date +%s) | |
| - name: Test Docker image | |
| run: | | |
| docker-compose up -d | |
| sleep 10 | |
| curl http://localhost:3000 || exit 1 | |
| docker-compose down |