mirror of
https://github.com/offen/website.git
synced 2024-11-22 17:10:29 +01:00
remove requirement for local SSL
This commit is contained in:
parent
74d8dbe0f3
commit
cbe8546945
22
README.md
22
README.md
@ -16,33 +16,13 @@ Project planning and issue tracking is done using [Pivotal Tracker](https://www.
|
|||||||
|
|
||||||
### Developing the application
|
### Developing the application
|
||||||
|
|
||||||
#### Local cookies and SSL
|
|
||||||
|
|
||||||
In local development __offen__ requires to be served both via SSL (in order to use window.crypto) as well as a `local.offen.dev` host.
|
|
||||||
|
|
||||||
This requires the following steps to be taken:
|
|
||||||
|
|
||||||
1. Edit your `/etc/hosts` to include the following line:
|
|
||||||
```
|
|
||||||
127.0.0.1 local.offen.dev
|
|
||||||
```
|
|
||||||
2. Install and setup [mkcert](https://github.com/FiloSottile/mkcert). Assuming you have Go installed, this looks like:
|
|
||||||
```
|
|
||||||
$ go get -u github.com/FiloSottile/mkcert
|
|
||||||
$ mkcert -install
|
|
||||||
```
|
|
||||||
3. Navigate into the repository root and create a local certificate and key for the `local.offen.dev` host:
|
|
||||||
```
|
|
||||||
$ mkcert local.offen.dev
|
|
||||||
```
|
|
||||||
|
|
||||||
You can test setup by starting the application:
|
You can test setup by starting the application:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker-compose up
|
$ docker-compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you should be able to access <https://local.offen.dev:8080/status> in your browser without any security warnings.
|
Now you should be able to access <http://localhost:8080/status> seeing a successful response.
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
|
||||||
|
@ -6,23 +6,19 @@ services:
|
|||||||
working_dir: /code/kms
|
working_dir: /code/kms
|
||||||
volumes:
|
volumes:
|
||||||
- .:/code
|
- .:/code
|
||||||
- ./local.offen.dev.pem:/code/kms/local.offen.dev.pem
|
|
||||||
- ./local.offen.dev-key.pem:/code/kms/local.offen.dev-key.pem
|
|
||||||
- $GOPATH/pkg/mod:/go/pkg/mod
|
- $GOPATH/pkg/mod:/go/pkg/mod
|
||||||
environment:
|
environment:
|
||||||
- GOPATH=/go
|
- GOPATH=/go
|
||||||
- KEY_FILE=key.txt
|
- KEY_FILE=key.txt
|
||||||
ports:
|
ports:
|
||||||
- 8081:8081
|
- 8081:8081
|
||||||
command: go run cmd/kms/main.go -key local.offen.dev-key.pem -cert local.offen.dev.pem -port 8081 -origin https://local.offen.dev:9977
|
command: go run cmd/kms/main.go -port 8081 -origin http://localhost:9977
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: golang:1.12
|
image: golang:1.12
|
||||||
working_dir: /code/server
|
working_dir: /code/server
|
||||||
volumes:
|
volumes:
|
||||||
- .:/code
|
- .:/code
|
||||||
- ./local.offen.dev.pem:/code/server/local.offen.dev.pem
|
|
||||||
- ./local.offen.dev-key.pem:/code/server/local.offen.dev-key.pem
|
|
||||||
- $GOPATH/pkg/mod:/go/pkg/mod
|
- $GOPATH/pkg/mod:/go/pkg/mod
|
||||||
environment:
|
environment:
|
||||||
- GOPATH=/go
|
- GOPATH=/go
|
||||||
@ -30,7 +26,7 @@ services:
|
|||||||
- KMS_ENCRYPTION_ENDPOINT=http://kms:8081/encrypt
|
- KMS_ENCRYPTION_ENDPOINT=http://kms:8081/encrypt
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
command: go run cmd/server/main.go -origin https://local.offen.dev:9977 -conn postgres://postgres:develop@database:5432/postgres?sslmode=disable -key local.offen.dev-key.pem -cert local.offen.dev.pem -level debug
|
command: go run cmd/server/main.go -origin http://localhost:9977 -conn postgres://postgres:develop@database:5432/postgres?sslmode=disable -level debug
|
||||||
links:
|
links:
|
||||||
- database
|
- database
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -46,38 +42,32 @@ services:
|
|||||||
working_dir: /offen/vault
|
working_dir: /offen/vault
|
||||||
volumes:
|
volumes:
|
||||||
- .:/offen
|
- .:/offen
|
||||||
- ./local.offen.dev.pem:/offen/vault/local.offen.dev.pem
|
|
||||||
- ./local.offen.dev-key.pem:/offen/vault/local.offen.dev-key.pem
|
|
||||||
command: npm start -- --port 9977
|
command: npm start -- --port 9977
|
||||||
ports:
|
ports:
|
||||||
- 9977:9977
|
- 9977:9977
|
||||||
environment:
|
environment:
|
||||||
- SERVER_HOST=https://local.offen.dev:8080
|
- SERVER_HOST=http://localhost:8080
|
||||||
- KMS_HOST=https://local.offen.dev:8081
|
- KMS_HOST=http://localhost:8081
|
||||||
- AUDITORIUM_HOST=https://local.offen.dev:9955
|
- AUDITORIUM_HOST=http://localhost:9955
|
||||||
|
|
||||||
script:
|
script:
|
||||||
image: timbru31/node-chrome:slim
|
image: timbru31/node-chrome:slim
|
||||||
working_dir: /offen/script
|
working_dir: /offen/script
|
||||||
volumes:
|
volumes:
|
||||||
- .:/offen
|
- .:/offen
|
||||||
- ./local.offen.dev.pem:/offen/script/local.offen.dev.pem
|
|
||||||
- ./local.offen.dev-key.pem:/offen/script/local.offen.dev-key.pem
|
|
||||||
command: npm start -- --port 9966
|
command: npm start -- --port 9966
|
||||||
ports:
|
ports:
|
||||||
- 9966:9966
|
- 9966:9966
|
||||||
environment:
|
environment:
|
||||||
- VAULT_HOST=https://local.offen.dev:9977
|
- VAULT_HOST=http://localhost:9977
|
||||||
|
|
||||||
auditorium:
|
auditorium:
|
||||||
image: timbru31/node-chrome:slim
|
image: timbru31/node-chrome:slim
|
||||||
working_dir: /offen/auditorium
|
working_dir: /offen/auditorium
|
||||||
volumes:
|
volumes:
|
||||||
- .:/offen
|
- .:/offen
|
||||||
- ./local.offen.dev.pem:/offen/auditorium/local.offen.dev.pem
|
|
||||||
- ./local.offen.dev-key.pem:/offen/auditorium/local.offen.dev-key.pem
|
|
||||||
command: npm start -- --port 9955
|
command: npm start -- --port 9955
|
||||||
ports:
|
ports:
|
||||||
- 9955:9955
|
- 9955:9955
|
||||||
environment:
|
environment:
|
||||||
- VAULT_HOST=https://local.offen.dev:9977
|
- VAULT_HOST=http://localhost:9977
|
||||||
|
Loading…
Reference in New Issue
Block a user