mirror of
https://github.com/System-End/theseus.git
synced 2026-04-19 14:27:03 +00:00
Use ENV vars for SMTP config in production; build on all branches
This commit is contained in:
parent
0201df9a33
commit
104a9437bd
3 changed files with 9 additions and 7 deletions
5
.github/workflows/docker.yml
vendored
5
.github/workflows/docker.yml
vendored
|
|
@ -2,7 +2,6 @@ name: Build and push Docker image
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [OAuth_Delegated_Token]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -12,6 +11,8 @@ jobs:
|
|||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set lowercase owner
|
||||
run: echo "OWNER=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
|
@ -22,6 +23,6 @@ jobs:
|
|||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ghcr.io/system-end/theseus:latest
|
||||
tags: ghcr.io/${{ env.OWNER }}/theseus:latest
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
FROM ghcr.io/system-end/theseus:latest
|
||||
ARG OWNER=system-end
|
||||
FROM ghcr.io/${OWNER}/theseus:latest
|
||||
|
|
|
|||
|
|
@ -61,10 +61,10 @@ Rails.application.configure do
|
|||
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: "smtp.loops.so",
|
||||
port: 587,
|
||||
user_name: "loops",
|
||||
password: Rails.application.credentials.dig(:loops, :api_key),
|
||||
address: ENV.fetch("SMTP_ADDRESS", "smtp.loops.so"),
|
||||
port: ENV.fetch("SMTP_PORT", 587).to_i,
|
||||
user_name: ENV.fetch("SMTP_USERNAME", "loops"),
|
||||
password: ENV["SMTP_PASSWORD"] || Rails.application.credentials.dig(:loops, :api_key),
|
||||
authentication: "plain",
|
||||
enable_starttls: true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue