Skip to content

Commit

Permalink
Another Github Actions Implementation Try #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Henriquess19 committed Jul 1, 2023
1 parent e56e2fe commit ef9771d
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 54 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,8 @@ jobs:
java-version: 17
- name: Build Docker images
env:
<<<<<<< Updated upstream
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: classcode
JDBC_DATABASE_URL: jdbc:postgresql://db-docker:5432/classcode?user=postgres&password=postgres
run: code/jvm/gradlew -p code/jvm/ check
=======
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: classcode
JDBC_DATABASE_URL: jdbc:postgresql://db-docker:5432/classcode?user=postgres&password=postgres
run: code/jvm/gradlew -p code/jvm/ actions
>>>>>>> Stashed changes
4 changes: 0 additions & 4 deletions code/jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ task<Exec>("dbDockerDown") {
}

task<Exec>("composeUp") {
<<<<<<< Updated upstream
commandLine("docker-compose", "up", "--build", "--force-recreate")
=======
commandLine("docker", "compose","-f","docker-compose.composeUp.yml", "up", "--build", "--force-recreate")
>>>>>>> Stashed changes
dependsOn("extractUberJar")
}

Expand Down
32 changes: 1 addition & 31 deletions code/jvm/docker-compose.composeUp.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
version: "3.9"
services:
# The service running the DB
db-docker:
container_name: db-docker
hostname: db-docker
build:
context: ../..
dockerfile: code/jvm/docker/files/Dockerfile-db
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}

ports:
- "5432:5432"

networks:
- net-classcode

# The service running the API
spring-service:
Expand All @@ -32,12 +15,6 @@ services:
ports:
- "8080:8080"

networks:
- net-classcode

depends_on:
- db-docker

# The service running the load-balancer
nginx:
container_name: nginx
Expand All @@ -49,11 +26,4 @@ services:
- "3000:3000"

depends_on:
- spring-service

networks:
- net-classcode

networks:
net-classcode:
driver: bridge
- spring-service
4 changes: 0 additions & 4 deletions code/jvm/docker/files/Dockerfile-db
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ COPY --chown=postgres:postgres ./code/jvm/docker/scripts/wait-for-postgres.sh ./
RUN chmod +x ./bin/wait-for-postgres.sh

# Expose PostgreSQL default port
<<<<<<< Updated upstream
EXPOSE 5432
=======
EXPOSE 5432
>>>>>>> Stashed changes
3 changes: 0 additions & 3 deletions code/jvm/docker/files/Dockerfile-ubuntu

This file was deleted.

4 changes: 0 additions & 4 deletions code/jvm/docker/scripts/wait-for-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,3 @@ done
>&2 echo "Postgres is up - executing command '$cmd'"
eval "$cmd"

<<<<<<< Updated upstream

=======
>>>>>>> Stashed changes

0 comments on commit ef9771d

Please sign in to comment.