Giter VIP home page Giter VIP logo

docker-compose-actions-workflow's People

Contributors

peter-evans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-compose-actions-workflow's Issues

run logs in README example are expired

The run logs in README example are expired and therefore not visible. Since it's a big part of the example it would be great if they were at least rerun. To increase resiliency something like screenshotting the most relevant bits and adding them directly to the README might make rerunning less urgent in the future?

Process completed with exit code 7.

Nice example, but when running in my action, it failed.

Action Logs:

Run docker run --rm appropriate/curl -s --retry 3 --retry-connrefused http://localhost:8080/
Unable to find image 'appropriate/curl:latest' locally
latest: Pulling from appropriate/curl
ff3a5c916c92: Pulling fs layer
3151abf94102: Pulling fs layer
58ae3cb4aac4: Pulling fs layer
3151abf94102: Verifying Checksum
3151abf94102: Download complete
58ae3cb4aac4: Verifying Checksum
58ae3cb4aac4: Download complete
ff3a5c916c92: Download complete
ff3a5c916c92: Pull complete
3151abf94102: Pull complete
58ae3cb4aac4: Pull complete
Digest: sha256:c8bf5bbec6397465a247c2bb3e589bb77e4f62ff88a027175ecb2d9e4f12c9d7
Status: Downloaded newer image for appropriate/curl:latest
##[error]Process completed with exit code 7.

My docker-compose file:

version: '3.7'

services:
  wordpress:
    image: wordpress:latest
    depends_on:
      - wordpress_db
    ports:
      - "8080:80"
#    volumes:
#     - type: bind
#       source: ./wp-content
#       target: /var/www/html/wp-content
    restart: always
    environment:
      WORDPRESS_DB_HOST: wordpress_db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: secret
      WORDPRESS_DB_NAME: wordpress

  wordpress_db:
    image: mysql:5.7
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: secret

  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    depends_on:
      - wordpress_db
    restart: always
    ports:
      - "8888:80"
    environment:
      PMA_HOST: wordpress_db
      MYSQL_ROOT_PASSWORDL: secret
    networks:
      - back

networks:
  back:
volumes:
  db_data: {}

My action workflow file:

name: build
on: 
  push:
    branches:
      - master
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build services
        run: docker-compose up -d
      - name: List container
        run: docker-compose ps
      - name: Test Wordpress container
        run: docker run --rm --network container:wordpress-docker-compose_wordpress_1 appropriate/curl -s --retry 3 --retry-connrefused http://localhost:8080/
      - name: Test PhpMyAdmin container
        run: docker run --rm --network container:wordpress-docker-compose_phpmyadmin_1 appropriate/curl -s --retry 3 --retry-connrefused http://localhost:8888/

Use actions/cache

Hey there!

Nice example. Did you thought about using actions/cache to cache docker images that have to be downloaded every build?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.