Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alfg/docker-vapor
A Docker build for Vapor
https://github.com/alfg/docker-vapor
api docker http swift vapor
Last synced: 5 days ago
JSON representation
A Docker build for Vapor
- Host: GitHub
- URL: https://github.com/alfg/docker-vapor
- Owner: alfg
- License: mit
- Created: 2018-12-17T01:24:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-29T05:01:41.000Z (over 5 years ago)
- Last Synced: 2024-12-24T15:26:04.977Z (about 2 months ago)
- Topics: api, docker, http, swift, vapor
- Language: Swift
- Homepage: https://github.com/alfg/docker-vapor
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Vapor
A simple Docker Vapor example.[](https://hub.docker.com/r/alfg/vapor/)
[](https://hub.docker.com/r/alfg/vapor/)
[](https://hub.docker.com/r/alfg/vapor/builds/)## Usage
* Build Docker image:
```bash
$ docker-compose build
```* Run bash in container:
```bash
$ docker-compose run --service-ports app
```* Build and run:
```bash
$ swift build$ ./.build/x86_64-unknown-linux/debug/Run -b 0.0.0.0
Running default command: ./.build/x86_64-unknown-linux/debug/Run serve
Server starting on http://0.0.0.0:8080
```> Note: You must bind to `0.0.0.0` so you can access from outside the container.
* Load `http://localhost:8080/hello`:
```
$ curl http://localhost:8080/hello
Hello, world.
```## Resources
* https://docs.vapor.codes/3.0/install/ubuntu/## License
MIT