From 57ffc2dfba63d1362deed30ec0165c91de9cb56d Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Fri, 28 Apr 2023 20:00:54 -0400 Subject: [PATCH 1/2] Comment out server.documents.location and update example config --- cmd/server.go | 13 +++++--- examples/config/agecem-org.yaml | 54 ++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/cmd/server.go b/cmd/server.go index 761d343..8fb1e56 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -51,9 +51,12 @@ func init() { serverCmd.Flags().Int("server-port", 8080, "Port to run the webserver on (config: server.port)") viper.BindPFlag("server.port", serverCmd.Flags().Lookup("server-port")) - // server.documents.location - --server-documents-location - serverCmd.Flags().String("server-documents-location", "us-east", "Storage bucket location (config: server.documents.location)") - viper.BindPFlag("server.documents.location", serverCmd.Flags().Lookup("server-documents-location")) + // Not currently used + /* + // server.documents.location - --server-documents-location + serverCmd.Flags().String("server-documents-location", "us-east", "Storage bucket location (config: server.documents.location)") + viper.BindPFlag("server.documents.location", serverCmd.Flags().Lookup("server-documents-location")) + */ // server.documents.endpoint - --server-documents-endpoint serverCmd.Flags().String("server-documents-endpoint", "minio:9000", "Storage server endpoint (config: server.documents.endpoint)") @@ -87,11 +90,11 @@ func init() { serverCmd.Flags().Bool("server-admin-auth", false, "Enable to allow basic authentication for /admin routes (config: server.admin.auth)") viper.BindPFlag("server.admin.auth", serverCmd.Flags().Lookup("server-admin-auth")) - // server.admin.username - --server-frontend-username + // server.admin.username - --server-admin-username serverCmd.Flags().String("server-admin-username", "", "Username for basic authentication for /admin routes (config: server.admin.username)") viper.BindPFlag("server.admin.username", serverCmd.Flags().Lookup("server-admin-username")) - // server.admin.password - --server-frontend-password + // server.admin.password - --server-admin-password serverCmd.Flags().String("server-admin-password", "", "Password for basic authentication for /admin routes (config: server.admin.password)") viper.BindPFlag("server.admin.password", serverCmd.Flags().Lookup("server-admin-password")) } diff --git a/examples/config/agecem-org.yaml b/examples/config/agecem-org.yaml index d8985b8..55a2535 100644 --- a/examples/config/agecem-org.yaml +++ b/examples/config/agecem-org.yaml @@ -1,14 +1,66 @@ +# Server configuration server: + # Port on which to run the webserver + # + # Currently only opens to all interfaces, and exposes the + # html and REST API routes on the same port. port: 8080 + documents: + # Endpoint of the minio instance, without the protocol + # + # If deployed with docker-compose, specify minio's services.name + # (minio by default) + # + # If deployed elsewhere, specify minio's host ip or localhost if such is + # the case. endpoint: 'minio:9000' + + # Turn on to specify that requests to minio should be done over https + # + # Recommended to be turned on if minio instance is exposed to a network + # that others have access to (i.e. not an isolated docker network) use_ssl: false + + # Access credentials for minio instance. + # + # Can match either the initial credentials used during deployment of + # minio (.env for docker-compose) or credentials manually created in the minio instance. + # + # Change this to match your deployment access_key_id: 'agecem-org' secret_access_key: 'agecem-org' + + # Which buckets are allowed to be manipulated in the minio instance by the application. + # + # Also used to specify which buckets are to be created on receiving a POST request on /v1/seed buckets: - 'proces-verbaux' - 'politiques-et-reglements' + api: - # necessary for production use + # Enable or disable key auth on /v1 routes + # + # Recommended to be on in production auth: true + + # Key for authenticating to /v1 routes. + # + # Minimum 10 characters + # + # Change this in production key: 'agecem-org' + + admin: + # Enable or disable basic auth on /admin routes + # + # Recommended to be on in production + auth: true + + # Username and password for authenticating to /admin routes + # + # Minimum 5 characters for username and 10 characters for password + # + # Change this in production + username: 'agecem-org' + password: 'agecem-org' From 91811a4caa5505b168597238b086015cc4fcae45 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Fri, 28 Apr 2023 20:08:59 -0400 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20nom=20d'image=20qui=20default=20?= =?UTF-8?q?=C3=A0=20docker.io?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 3284b36..2eae081 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,7 +12,7 @@ services: - 'minio' restart: unless-stopped build: . - image: agecem/agecem-org:latest + image: git.agecem.com/agecem/agecem-org:latest ports: - '8080:8080' volumes: