Cloning
git clone --recursive https://github.com/marcusjwhelan/swiftDevOpsTester.git
Start container cluster in detached mode don't cache the build setup
docker-compose build --no-cache
docker-compose up -d
Attach to container
hit enter twice to get to bash prompt of container
docker attach vapor_it_container
In api:dev container build application and start it
swift build && swift run Run serve -b 0.0.0.0
Should get output
Server starting on http://0.0.0.0:8080
Application can be accessed now at localhost:8080/users for list of users or posting.
Runs local build structured test from /.circleci/config.yml
circleci local execute --job build-image
All that needs to be done is commit to the master branch.
Possibly changed to it having to be a pull request. not sure if it has to be on master
Using postman hit address localhost:8080/users/
with a post request holding {"username":"content","password":"admin"}
. Now your first user is added. This is the simple route on the end of an api.
docker-compose down
When adding client I used gatsby from the outside then cd
into gatsby client directory. Did all the git init work and created new repo on github. Once that was done I navigated back to project directory and made the client directory a submodule with
git submodule add https://github.com/marcusjwhelan/swiftDevOpsTesterReact.git client
And a git push -f