Skip to content
Snippets Groups Projects
Commit c8cde3b8 authored by ExtraDev's avatar ExtraDev
Browse files

update documentation

parent 82817b79
No related branches found
No related tags found
No related merge requests found
...@@ -15,3 +15,5 @@ services: ...@@ -15,3 +15,5 @@ services:
build: ./appSec build: ./appSec
ports: ports:
- 8080:8080 - 8080:8080
env_file:
- ./appSec/.env
...@@ -397,7 +397,7 @@ Par exemple : ...@@ -397,7 +397,7 @@ Par exemple :
# Exemple 1 # Exemple 1
var toValidate = map[string]string{ var toValidate = map[string]string{
"aud": "api://default", "aud": "api://default",
"cid": os.Getenv("0oa2v5g9mlEE1V4Gp5d7"), "cid": os.Getenv("OKTA_CLIENT_ID"),
} }
# Exemple 2 # Exemple 2
...@@ -408,3 +408,27 @@ env_passwd := os.Getenv("USERS_PASSWORD") ...@@ -408,3 +408,27 @@ env_passwd := os.Getenv("USERS_PASSWORD")
Issuer: "https://" + os.Getenv("OKTA_DOMAIN") + "/oauth2/default", Issuer: "https://" + os.Getenv("OKTA_DOMAIN") + "/oauth2/default",
``` ```
Afin que le fichier main.go puisse accéder aux variables d'envorinnements, il faut modifier le fichier docker-compose et indiquer où il se trouve en ajoutant le champ "env_file" au container de appsec.
```yml
version: '3'
services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./certs:/certs
- ./logs:/etc/nginx/logs/
ports:
- 80:80
- 443:443
appsec:
build: ./appSec
ports:
- 8080:8080
env_file:
- ./appSec/.env
```
\ No newline at end of file
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment