diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d0e4337 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM openjdk:21 + +COPY target/ArtisanConnectBackend-0.0.1-SNAPSHOT.jar app.jar + +ENTRYPOINT ["java","-jar","/app.jar"] \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 5d93b67..7703ee1 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,9 +1,25 @@ services: - postgres: + app: + container_name: artisan + build: . + networks: + - artisan_network + depends_on: + - db + + db: + container_name: db image: 'postgres:latest' environment: - - 'POSTGRES_DB=default' + - 'POSTGRES_DB=postgres' - 'POSTGRES_PASSWORD=postgres' - 'POSTGRES_USER=postgres' ports: - '5432:5432' + networks: + - artisan_network + +networks: + artisan_network: + name: artisan_net + external: false \ No newline at end of file