The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

73 lines
2.7 KiB

  1. #
  2. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  3. #
  4. # Creates a Docker image that runs the Bubble Launcher. You shouldn't have to use this file directly.
  5. #
  6. # For Linux and Mac OS, you can try the easier way, using a prebuilt image from DockerHub:
  7. #
  8. # /bin/bash -c "$(curl -sL https://git.bubblev.org/bubblev/bubble/raw/branch/master/docker/launcher)"
  9. #
  10. # See docs/docker-launcher.md for more information
  11. # Full URL for more info: https://git.bubblev.org/bubblev/bubble/src/branch/master/docs/docker-launcher.md
  12. #
  13. FROM phusion/baseimage:focal-1.0.0alpha1-amd64
  14. MAINTAINER jonathan@getbubblenow.com
  15. LABEL maintainer="jonathan@getbubblenow.com"
  16. LABEL license="https://getbubblenow.com/license"
  17. # Install packages
  18. RUN apt update -y
  19. RUN DEBIAN_FRONTEND=noninteractive apt upgrade -y --no-install-recommends
  20. RUN DEBIAN_FRONTEND=noninteractive apt install openjdk-11-jre-headless postgresql redis-server jq python3 python3-pip curl zip unzip -y --no-install-recommends
  21. RUN pip3 install setuptools psycopg2-binary
  22. #################
  23. ### Redis
  24. #################
  25. # Ensure redis runs in foreground
  26. RUN bash -c "sed -i -e 's/daemonize yes/daemonize no/g' /etc/redis/redis.conf"
  27. # Setup redis service
  28. RUN mkdir /etc/service/redis
  29. COPY bubble-server/src/main/resources/docker/run_redis.sh /etc/service/redis/run
  30. #################
  31. ### PostgreSQL
  32. #################
  33. # trust local postgresql users
  34. RUN bash -c "sed -i -e 's/ md5/ trust/g' $(find /etc/postgresql -mindepth 1 -maxdepth 1 -type d | sort | tail -1)/main/pg_hba.conf"
  35. # Create "root" postgres user and bubble database
  36. RUN bash -c "service postgresql start && sleep 5s && service postgresql status && \
  37. su - postgres bash -c 'createuser -h 127.0.0.1 -U postgres --createdb --createrole --superuser root' && \
  38. su - postgres bash -c 'createuser -h 127.0.0.1 -U postgres --createdb bubble'"
  39. # Setup PostgreSQL service
  40. RUN mkdir /etc/service/postgresql
  41. COPY bubble-server/src/main/resources/docker/run_postgresql.sh /etc/service/postgresql/run
  42. #################
  43. ### Bubble
  44. #################
  45. # Install packer
  46. RUN mkdir /bubble
  47. COPY bin/install_packer.sh /usr/local/bin/
  48. RUN /usr/local/bin/install_packer.sh
  49. # Install API jar, touch env file. Make sure we get the regular jar and not the full jar
  50. COPY bubble-server/target/bubble-server-*-prod.jar /bubble/bubble.jar
  51. RUN touch /bubble/bubble.env
  52. # Setup Bubble service
  53. RUN mkdir /etc/service/bubble
  54. COPY bubble-server/src/main/resources/docker/run_bubble.sh /etc/service/bubble/run
  55. #################
  56. ### Main stuff
  57. #################
  58. # Expose bubble port
  59. EXPOSE 8090
  60. # Phusion baseimage runs the services created above
  61. CMD ["/sbin/my_init"]