This service powers winchatty.com
. View the API documentation.
- Use the VSCode devcontainer.
- Edit
src/appsettings.json
and fill in, at minimum, theSharedLogin
andStorage
sections. - In the
build
directory, run./debug.sh
.
- Set the production
appsettings.json
text in Parameter Store in the key/SimpleChattyServer/config
. - Install AWSCLI.
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
- Add AWS credentials.
mkdir ~/.aws && cat > ~/.aws/credentials
- In the
build
directory, run./clean.sh && ./publish.sh && ./upload.sh
. - In the
terraform
directory, runterraform taint aws_instance.simple_chatty_server && terraform apply
.
If you need to update appsettings.json, set it in Parameter Store and then run as root:
aws ssm get-parameter --name /SimpleChattyServer/config --query "Parameter.Value" --output text --region us-east-1 --with-decryption > /opt/simple-chatty-server/appsettings.json
Run as root:
cd /opt/simple-chatty-server && \
systemctl stop simple-chatty-server.service && \
mv SimpleChattyServer SimpleChattyServer.bak && \
aws s3 cp s3://simple-chatty-server/SimpleChattyServer.gz /opt/simple-chatty-server/ && \
gunzip /opt/simple-chatty-server/SimpleChattyServer.gz && \
chmod x /opt/simple-chatty-server/SimpleChattyServer && \
systemctl start simple-chatty-server.service && \
journalctl -f | grep -v GET
If that blows up, roll back to the previous version:
cd /opt/simple-chatty-server && \
systemctl stop simple-chatty-server.service && \
mv SimpleChattyServer.bak SimpleChattyServer && \
systemctl start simple-chatty-server.service && \
journalctl -f | less