The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

74 rader
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. # 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.sh)"
  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 unzip -y --no-install-recommends
  21. RUN DEBIAN_FRONTEND=noninteractive apt install xtail -y --no-install-recommends
  22. RUN pip3 install setuptools psycopg2-binary
  23. #################
  24. ### Redis
  25. #################
  26. # Ensure redis runs in foreground
  27. RUN bash -c "sed -i -e 's/daemonize yes/daemonize no/g' /etc/redis/redis.conf"
  28. # Setup redis service
  29. RUN mkdir /etc/service/redis
  30. COPY docker/run_redis.sh /etc/service/redis/run
  31. #################
  32. ### PostgreSQL
  33. #################
  34. # trust local postgresql users
  35. 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"
  36. # Create "root" postgres user and bubble database
  37. RUN bash -c "service postgresql start && sleep 5s && service postgresql status && \
  38. su - postgres bash -c 'createuser -h 127.0.0.1 -U postgres --createdb --createrole --superuser root' && \
  39. su - postgres bash -c 'createuser -h 127.0.0.1 -U postgres --createdb bubble'"
  40. # Setup PostgreSQL service
  41. RUN mkdir /etc/service/postgresql
  42. COPY docker/run_postgresql.sh /etc/service/postgresql/run
  43. #################
  44. ### Bubble
  45. #################
  46. # Install packer
  47. RUN mkdir /bubble
  48. COPY bin/install_packer.sh /usr/local/bin/
  49. RUN /usr/local/bin/install_packer.sh
  50. # Install API jar and env file
  51. COPY bubble-server/target/bubble-server-*.jar /bubble/bubble.jar
  52. COPY docker/bubble.env /bubble/bubble.env
  53. # Setup Bubble service
  54. RUN mkdir /etc/service/bubble
  55. COPY docker/run_bubble.sh /etc/service/bubble/run
  56. #################
  57. ### Main stuff
  58. #################
  59. # Expose bubble port
  60. EXPOSE 8090
  61. # Phusion baseimage runs the services created above
  62. CMD ["/sbin/my_init"]