version: '3.7'

services:

  base: &base
    image: node:13.7.0-alpine
    restart: "no"
    volumes:
    - .:/code
    working_dir: /code
  npm:
    <<: *base
    environment:
      NPM_TOKEN: ${NPM_TOKEN}
    entrypoint: npm
  app:
    <<: *base
    restart: unless-stopped
    stdin_open: true
    tty: true
    ports:
    - 8008:8008
    command: node server