Skip to main content

docker-compose stack


version: '3'
services:
  db:
    image: mysql
    # NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
    # (this is just an example, not intended to be a production configuration)
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
      MYSQL_DATABASE: yourls
      MYSQL_USER: yourls
      MYSQL_PASSWORD: yourls
      
  yourls:
    container_name: some-yourls
    links:
      - db
    depends_on:
      - db
    ports:
      - 8080:80
    environment:
      - YOURLS_SITE=https://dnb.wtf
      - YOURLS_USER=dbtech
      - YOURLS_PASS=iKickass13
      - YOURLS_DB_HOST=db
      - YOURLS_DB_USER=yourls
      - YOURLS_DB_PASS=yourls    
    image: yourls
    
volumes:
  dbs: