diff --git a/app/server/Dockerfile b/app/server/Dockerfile new file mode 100644 index 0000000000..8f0f7e3613 --- /dev/null +++ b/app/server/Dockerfile @@ -0,0 +1,19 @@ +#When you are building, name it appsmith-server which is how it is referenced in docker-compose.yml + +#FROM openjdk:11 +FROM adoptopenjdk/openjdk11:alpine-slim + +LABEL maintainer="tech@appsmith.com" + +VOLUME /tmp + +EXPOSE 8080 + +ARG JAR_FILE=appsmith-server/target/server-1.0-SNAPSHOT.jar + +#Add the jar to the container. Always keep this at the end. This is to ensure that all the things that can be taken +#care of via the cache happens. The following statement would lead to copy because of change in hash value +ADD ${JAR_FILE} server.jar + +#Run the jar +ENTRYPOINT ["java", "-Dspring.profiles.active=docker", "-jar", "/server.jar"] \ No newline at end of file diff --git a/app/server/appsmith-server/src/main/resources/application-docker.properties b/app/server/appsmith-server/src/main/resources/application-docker.properties new file mode 100644 index 0000000000..24d6d4a9ad --- /dev/null +++ b/app/server/appsmith-server/src/main/resources/application-docker.properties @@ -0,0 +1,21 @@ +#Mongo properties +spring.data.mongodb.database=mobtools +spring.data.mongodb.host=mongo +spring.data.mongodb.port=27017 + +logging.level.root=info +logging.level.com.appsmith=debug +logging.pattern.console=%X - %m%n + +# JDBC Postgres properties +jdbc.postgres.driver=org.postgresql.Driver +jdbc.postgres.url=jdbc:postgresql://localhost/mobtools +jdbc.postgres.username=postgres +jdbc.postgres.password=root + +#Spring security +spring.security.oauth2.client.registration.google.client-id=869021686091-9b84bbf7ea683t1aaefqnmefcnmk6fq6.apps.googleusercontent.com +spring.security.oauth2.client.registration.google.client-secret=9dvITt4OayEY1HfeY8bHX74p + +# Accounts from specific domains are allowed to login +oauth2.allowed-domains=appsmith.com \ No newline at end of file diff --git a/app/server/docker-compose.yml b/app/server/docker-compose.yml new file mode 100644 index 0000000000..2fad306519 --- /dev/null +++ b/app/server/docker-compose.yml @@ -0,0 +1,22 @@ +version: "3" + +services: + appsmith-internal-server: + image: appsmith-server + ports: + - "8080:8080" + links: + - mongo + networks: + - appsmith + + mongo: + image: mongo + ports: + - "27017:27017" + networks: + - appsmith + +networks: + appsmith: + driver: bridge \ No newline at end of file