Skip to content

Commit

Permalink
updated action to build on server
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-urner committed Mar 11, 2024
1 parent 6a29c3b commit e024562
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/dockerprod-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Deploy via Docker
run: |
docker compose down
docker compose up -d
- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Deploy via Docker
run: |
docker compose down
docker compose up -d
26 changes: 13 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ services:
networks:
- spring-mysql-network

# api:
# build: .
# ports:
# - 40102:8080
# container_name: spring_boot_api
# environment:
# SPRING_DATASOURCE_URL: jdbc:mysql://mysql_db:3306/volo_db
# # SPRING_DATASOURCE_USERNAME: your_database_user
# # SPRING_DATASOURCE_PASSWORD: your_database_password
# depends_on:
# - mysql_db
# networks:
# - spring-mysql-network
api:
build: .
ports:
- 40102:8080
container_name: spring_boot_api
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql_db:3306/volo_db
# SPRING_DATASOURCE_USERNAME: your_database_user
# SPRING_DATASOURCE_PASSWORD: your_database_password
depends_on:
- mysql_db
networks:
- spring-mysql-network

networks:
spring-mysql-network:
Expand Down

0 comments on commit e024562

Please sign in to comment.