Compare commits
9 commits
main
...
feature/de
Author | SHA1 | Date | |
---|---|---|---|
4d8f7391ea | |||
53d1b68341 | |||
0ca780f4aa | |||
843129590c | |||
9990cba517 | |||
db7bf14113 | |||
8ac21ec362 | |||
39dcae3a81 | |||
33f6bcedb1 |
5 changed files with 47 additions and 32 deletions
26
.gitea/workflows/build.yaml
Normal file
26
.gitea/workflows/build.yaml
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: Build and push Docker image
|
||||
on: push
|
||||
# pull_request:
|
||||
# types:
|
||||
# - closed
|
||||
# branches:
|
||||
# - main
|
||||
jobs:
|
||||
build:
|
||||
runs-on: remote
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://git.simonis.lol/actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
run: docker buildx build -f frontend/.docker/Dockerfile -t git.simonis.lol/projects/casino:frontend-latest frontend
|
||||
|
||||
- name: Login
|
||||
uses: https://git.simonis.lol/actions/login@v1
|
||||
with:
|
||||
registry: git.simonis.lol
|
||||
username: ${{ vars.DOCKER_USER }}
|
||||
password: ${{ vars.DOCKER_PW }}
|
||||
|
||||
- name: Push
|
||||
run: docker push git.simonis.lol/projects/casino:frontend-latest
|
15
frontend/.docker/Dockerfile
Normal file
15
frontend/.docker/Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM oven/bun:latest AS build
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY .. .
|
||||
RUN bun install --prod
|
||||
RUN bun run build
|
||||
|
||||
FROM oven/bun:latest AS prod
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build /app /app
|
||||
|
||||
CMD ["bun", "run", "start"]
|
5
frontend/.dockerignore
Normal file
5
frontend/.dockerignore
Normal file
|
@ -0,0 +1,5 @@
|
|||
.angular
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.docker
|
|
@ -1,31 +0,0 @@
|
|||
version: '3'
|
||||
|
||||
volumes:
|
||||
employee_postgres_data:
|
||||
driver: local
|
||||
|
||||
services:
|
||||
postgres-employee:
|
||||
container_name: postgres_employee
|
||||
image: postgres:13.3
|
||||
volumes:
|
||||
- employee_postgres_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_DB: employee_db
|
||||
POSTGRES_USER: employee
|
||||
POSTGRES_PASSWORD: secret
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
employee:
|
||||
container_name: employee
|
||||
image: berndheidemann/employee-management-service:1.0.4
|
||||
# image: berndheidemann/employee-management-service_without_keycloak:1.1
|
||||
environment:
|
||||
spring.datasource.url: jdbc:postgresql://postgres-employee:5432/employee_db
|
||||
spring.datasource.username: employee
|
||||
spring.datasource.password: secret
|
||||
ports:
|
||||
- "8089:8089"
|
||||
depends_on:
|
||||
- postgres-employee
|
|
@ -4,7 +4,7 @@
|
|||
"scripts": {
|
||||
"ng": "bunx @angular/cli",
|
||||
"start": "bunx @angular/cli serve --proxy-config src/proxy.conf.json",
|
||||
"build": "bunx @angular/cli build",
|
||||
"build": "bunx @angular/cli build --no-watch",
|
||||
"watch": "bunx @angular/cli build --watch --configuration development",
|
||||
"test": "bunx @angular/cli test",
|
||||
"format": "prettier --write \"src/**/*.{ts,html,css,scss}\"",
|
||||
|
|
Reference in a new issue