The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

73 satır
2.6 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. # This is the "slim" version, which is about 200MB smaller than the full version.
  7. #
  8. # Slim means:
  9. # - We don't run `apt upgrade` and continue on with default packages (slightly risky)
  10. # - We don't install packer. it gets installed the first time the image is run
  11. # - We don't install the Bubble jar. it gets downloaded and installed the first time the image is run
  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. # Touch env file only
  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_slim.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"]