-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(workflow): change workflow logic from running docker compose to ru…
…nning dockerfile
- Loading branch information
1 parent
7c15f8d
commit e5417a0
Showing
3 changed files
with
24 additions
and
14 deletions.
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
name: Build Backend and Docker Image | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: ["main", "dev"] | ||
branches: | ||
- main | ||
- dev | ||
paths: | ||
- 'apps/backend/**' | ||
- "apps/backend/**" | ||
|
||
jobs: | ||
build-and-lint: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build Docker Image | ||
working-directory: apps/backend | ||
run: docker-compose build --pull --no-cache | ||
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) |
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,7 @@ | ||
FROM postgres:15 | ||
|
||
ENV POSTGRES_USER=${POSTGRES_USER} | ||
ENV POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
ENV POSTGRES_DB=devix_admin | ||
|
||
COPY init.sql /docker-entrypoint-initdb.d/ |
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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
version: "3" | ||
|
||
services: | ||
devixid: | ||
image: "postgres:15" | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: devixid | ||
ports: | ||
- "5434:5432" | ||
environment: | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
POSTGRES_DB: devix_admin | ||
devixid_dev: | ||
image: "postgres:15" | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: devixid_dev | ||
ports: | ||
- "5435:5432" | ||
environment: | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
POSTGRES_DB: devix_admin_dev |