Skip to content

Commit

Permalink
docker-compose for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dilox committed Apr 27, 2020
1 parent 952012c commit d090be6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ The backend API specification is documented here:
* [PDF](/documentation/documentation.pdf)
* [Swagger Editor](https://editor.swagger.io/?url=https://raw.githubusercontent.com/DP-3T/dp3t-sdk-backend/develop/documentation/yaml/sdk.yaml)

### Dev Environment
Use docker-compose to be easily up and running.
```
docker-compose -f app.yml up
curl -k https://localhost/v1
### Build
To build you need to install Maven.
Expand Down
2 changes: 0 additions & 2 deletions app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ services:
noiapp-caddy:
build: caddy
restart: unless-stopped
#hostname: demo.protetti.app
ports:
- 443:443
volumes:
- "/etc/letsencrypt/:/etc/letsencrypt/"
- "/var/log/caddy/:/var/log/caddy/"
depends_on:
- noiapp-backend
Expand Down
3 changes: 1 addition & 2 deletions caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
#}
localhost:443 {
reverse_proxy noiapp-backend:8080
# use your own certificate and key
# tls /etc/letsencrypt/live/protetti.app/fullchain.pem /etc/letsencrypt/live/protetti.app/privkey.pem
# use tls internal for dev environments (https://caddyserver.com/docs/caddyfile/directives/tls)
#tls /etc/letsencrypt/live/protetti.app/fullchain.pem /etc/letsencrypt/live/protetti.app/privkey.pem
tls internal
log {
output file /var/log/access.log {
Expand Down
2 changes: 1 addition & 1 deletion caddy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM caddy:latest
RUN apk update && apk add nss-tools
ADD Caddyfile /etc/caddy/
#VOLUME ["/etc/letsencrypt/"]
VOLUME ["/etc/letsencrypt/"]
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]

0 comments on commit d090be6

Please sign in to comment.