thesuhu

Docker Service

Sep 28th, 2020 (edited)
642
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # create service dari gitlab private repo
  2. docker login registry.gitlab.com
  3.  
  4. docker service create \
  5.   --with-registry-auth \
  6.   --name nama_svc \
  7.   --publish 81:3002 \
  8.   --replicas=1 \
  9.   --mount type=bind,source=/var/log/applog,destination=/logs \
  10.   registry.gitlab.com/.../.../.../nama_image:latest
  11.  
  12. # setelah itu tambahkan secret via portainer, overwrite .env dengan secret
  13. # create secret, copas isi .env ke secret
  14. # di service, add secret, pilih secret -> overide ke direktori root app (contoh: /usr/src/myapp/.env)
RAW Paste Data