diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..68d5258 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,14 @@ +FROM maven:3.9.11-eclipse-temurin-21 + +WORKDIR /app + +COPY pom.xml . +COPY application.yml . + +RUN mvn dependency:go-offline -B + +COPY src ./src + +EXPOSE 8080 + +CMD ["mvn", "spring-boot:run"] diff --git a/backend/application.yml b/backend/application.yml new file mode 100644 index 0000000..541a4fe --- /dev/null +++ b/backend/application.yml @@ -0,0 +1,21 @@ +spring: + datasource: + url: ${DB_URL} + username: ${DB_USER} + password: ${DB_PASSWORD} + driver-class-name: org.postgresql.Driver + + jpa: + hibernate: + ddl-auto: update + show-sql: true + properties: + hibernate: + dialect: org.hibernate.dialect.PostgreSQLDialect + format_sql: true + + application: + name: wesal + +server: + port: 8080 diff --git a/backend/pom.xml b/backend/pom.xml index ba34886..c085247 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -28,6 +28,8 @@ 21 + 21 + 21 @@ -96,7 +98,17 @@ org.springframework.boot spring-boot-maven-plugin + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + 21 + 21 + 21 + + - + \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0a89171..1a6f764 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,4 +17,21 @@ services: depends_on: - db ports: - - 8100:8080 \ No newline at end of file + - 8100:8080 + + server: + restart: unless-stopped + build: + context: ./backend + dockerfile: Dockerfile + ports: + - 4044:8080 + + + web: + restart: unless-stopped + build: + context: ./frontend + dockerfile: Dockerfile + ports: + - 6060:80 diff --git a/frontend/Dockerfile b/frontend/Dockerfile new file mode 100644 index 0000000..2e63451 --- /dev/null +++ b/frontend/Dockerfile @@ -0,0 +1,13 @@ +FROM ghcr.io/cirruslabs/flutter:3.32.6 AS build +WORKDIR /app + +COPY . . + +RUN flutter pub get +RUN flutter build web --release + +FROM nginx:alpine +COPY --from=build /app/build/web /usr/share/nginx/html + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/frontend/lib/constants/api_constants.dart b/frontend/lib/constants/api_constants.dart index 355cdda..26e058d 100644 --- a/frontend/lib/constants/api_constants.dart +++ b/frontend/lib/constants/api_constants.dart @@ -1,5 +1,5 @@ class ApiConstants { - static const String baseUrl = 'http://localhost:8080'; + static const String baseUrl = 'https://api.wesal.online'; // Auth endpoints static const String loginEndpoint = '/login'; @@ -7,7 +7,7 @@ class ApiConstants { // User endpoints static const String getUserEndpoint = '/getUser'; static const String updateUserEndpoint = '/updateUser'; - + // Invitation endpoints static const String invitationsEndpoint = '/invitations'; static const String getAllInvitationsEndpoint = '/invitations/all'; diff --git a/frontend/lib/screens/pages/profile_page.dart b/frontend/lib/screens/pages/profile_page.dart index 4c3457c..e0c9482 100644 --- a/frontend/lib/screens/pages/profile_page.dart +++ b/frontend/lib/screens/pages/profile_page.dart @@ -150,6 +150,7 @@ class _ProfilePageState extends State { preferredSize: Size.fromHeight(1), child: Container(height: 1, color: Colors.grey[200]), ), + automaticallyImplyLeading: false, ), body: SingleChildScrollView( child: Column( @@ -492,7 +493,7 @@ class _SettingsPageState extends State { bottom: PreferredSize( preferredSize: Size.fromHeight(1), child: Container(height: 1, color: Colors.grey[200]), - ), + ), automaticallyImplyLeading: true, ), body: Padding(