-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JOH-37] Docker #8
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d2131ec
feat: add file service docker
bookpanda 7542ffe
fix: host name
bookpanda a5b4bab
fix: container name
bookpanda f09b7fd
feat: add build workflow
bookpanda b01d66b
feat: update readme
bookpanda ec844f5
fix: volume path
bookpanda 8e36519
feat: backend config
bookpanda d930f03
fix: readme
bookpanda 2e3d363
fix: file port
bookpanda 58c9213
fix: remove linux/amd64
bookpanda 9de7f73
feat: add backend, auth in compose
bookpanda 5f3cdb2
feat: add auth config
bookpanda bf45b54
fix: package names/aliases
bookpanda 038f269
fix: package aliases
bookpanda 5740f10
Merge branch 'dev' into JOH-37/docker
bookpanda 6b487dc
Revert "Merge branch 'dev' into JOH-37/docker"
bookpanda 4078153
Revert "Revert "Merge branch 'dev' into JOH-37/docker""
bookpanda 58dd9d7
fix: build workflow set output
bookpanda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- beta | ||
- dev | ||
- master | ||
|
||
env: | ||
IMAGE_NAME: ghcr.io/${{ github.repository }} | ||
IMAGE_TAG: ${{ github.sha }} | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
outputs: | ||
BRANCH: ${{ steps.branch.outputs.BRANCH }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Set branch | ||
id: branch | ||
run: | | ||
echo "::set-output name=BRANCH::${GITHUB_REF#refs/heads/}" | ||
|
||
- name: Log in to the Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }},${{ env.IMAGE_NAME }}:latest | ||
cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache | ||
cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
app: | ||
port: 3002 | ||
debug: true | ||
secret: <secret> | ||
|
||
database: | ||
host: localhost | ||
port: 5432 | ||
name: johnjud_db | ||
username: root | ||
password: root | ||
|
||
jwt: | ||
secret: <secret> | ||
expires_in: 3600 | ||
refresh_token_ttl: 604800 | ||
issuer: <issuer> | ||
|
||
redis: | ||
host: localhost | ||
port: 6379 | ||
password: "" | ||
dbnum: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
app: | ||
port: 3003 | ||
debug: true | ||
|
||
database: | ||
host: local-db | ||
port: 5432 | ||
name: johnjud_db | ||
username: root | ||
password: root | ||
|
||
service: | ||
file: file:3004 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
app: | ||
port: 3004 | ||
debug: true | ||
|
||
database: | ||
host: local-db | ||
port: 5432 | ||
name: johnjud_db | ||
username: root | ||
password: root | ||
|
||
s3: | ||
bucket_name: <bucket name> | ||
region: <region> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
version: "3.9" | ||
|
||
services: | ||
local-auth: | ||
image: ghcr.io/isd-sgcu/johnjud-auth | ||
container_name: auth | ||
depends_on: | ||
- local-db | ||
- local-cache | ||
restart: unless-stopped | ||
networks: | ||
- johnjud-local | ||
- database | ||
volumes: | ||
- ./config/auth:/app/config | ||
ports: | ||
- "3002:3002" | ||
|
||
local-backend: | ||
image: ghcr.io/isd-sgcu/johnjud-backend | ||
container_name: backend | ||
depends_on: | ||
- local-db | ||
- local-cache | ||
restart: unless-stopped | ||
networks: | ||
- johnjud-local | ||
- database | ||
volumes: | ||
- ./config/backend:/app/config | ||
ports: | ||
- "3003:3003" | ||
|
||
local-file: | ||
image: ghcr.io/isd-sgcu/johnjud-file | ||
container_name: file | ||
depends_on: | ||
- local-db | ||
- local-cache | ||
restart: unless-stopped | ||
networks: | ||
- johnjud-local | ||
- database | ||
volumes: | ||
- ./config/file:/app/config | ||
ports: | ||
- "3004:3004" | ||
|
||
local-db: | ||
image: postgres:15.1-alpine3.17 | ||
container_name: local-db | ||
restart: unless-stopped | ||
environment: | ||
POSTGRES_USER: root | ||
POSTGRES_PASSWORD: root | ||
POSTGRES_DB: johnjud_db | ||
networks: | ||
- database | ||
volumes: | ||
- ./volumes/postgres:/var/lib/postgresql/data | ||
ports: | ||
- "5432:5432" | ||
|
||
local-cache: | ||
image: redis:7.2.3-alpine | ||
container_name: local-cache | ||
restart: unless-stopped | ||
environment: | ||
REDIS_HOST: localhost | ||
ALLOW_EMPTY_PASSWORD: "yes" | ||
networks: | ||
- database | ||
ports: | ||
- "6379:6379" | ||
|
||
networks: | ||
johnjud-local: | ||
name: johnjud-local | ||
database: | ||
name: database |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
set-output
is deprecated.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!