# Git setup
cd /lamp/ou-lamp-server
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/github_deploy_ed25519
git pull
# Remove the old LAMP image
sudo docker image ls
sudo docker image rm IMAGE_ID
# Build a new Docker image
cd /lamp/ou-lamp-server
sudo docker build -t lamp-ou .
# Stop the old deployment
sudo docker container ls
sudo docker stack down lamp
sudo docker container ls
# Deploy LAMP
cd /lamp
sudo docker stack deploy --compose-file lamp-custom.yml lamp
sudo docker container ls
# Wachten tot alle containers zijn opgestart... Dit duurt even.
# Get an admin password.
curl -k https://ou-lamp.b00.dev/researcher -H 'Authorization: Basic admin:admin'
sudo docker service logs lamp_server
# You can find the password in the log.
# Show the log
sudo docker service logs lamp_server