This repository contains example projects for the swift.org deployment guides.
A basic Todo app written using the Hummingbird framework and a local PostgreSQL database. The app connects to the database using a secure connection.
# generate certificates and keys
cd hummingbird-docker/docker/certificates/
./generate.sh
cd ../..
# run the services
docker-compose up
A basic Todo app written using the Vapor framework and a local PostgreSQL database. The app connects to the database using a secure connection.
# generate certificates and keys
cd vapor-docker/docker/certificates/
./generate.sh
cd ../..
# run the services
docker-compose up db server
# run migrations
docker-compose run migrations
Re-configure database service:
docker compose down --volumes && docker compose up db --build db
Create a Todo using cURL:
curl -X POST http://localhost:8080/todos \
-H "Content-Type: application/json" \
-d '{"title": "Buy milk"}'