Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 875 Bytes

PRODUCTION.md

File metadata and controls

51 lines (33 loc) · 875 Bytes

Deploy application to production

Setup manager

docker swarm init

Setup node

docker swarm join --token token --advertise-addr nodepi  managerip:2377

Create stack file

Just copy docker-compose.stack.yml to manager filesystem.

Create network

docker network create -d overlay --attachable twir

Create secrets

  1. Doppler

    echo "token" | docker secret create twir_doppler_token -
  2. Postgres

    echo "twir" | docker secret create twir_postgres_user -
    echo "twir" | docker secret create twir_postgres_db -
    echo "twir" | docker secret create twir_postgres_password -

Deploy

This command will deploy services from stack to the cluster.

docker stack deploy -c docker-compose.yml --with-registry-auth --prune twir

Update

Same command as deploy