SHARE
TWEET

Untitled

a guest Sep 11th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FROM mysql:5.7
  2.  
  3. # install the migrate tool
  4. RUN apt-get update && apt-get install -y curl apt-transport-https
  5. RUN curl -L https://packagecloud.io/golang-migrate/migrate/gpgkey | apt-key add -
  6. RUN echo "deb https://packagecloud.io/golang-migrate/migrate/ubuntu/ xenial main" > /etc/apt/sources.list.d/migrate.list
  7. RUN apt-get update && \
  8.     apt-get install -y migrate
  9.  
  10. # default mysql config
  11. ENV MIGRATIONS_PATH /migrations
  12. ENV PRODUCT simulation-server
  13. ENV MYSQL_DATABASE simulation_server
  14. ENV MYSQL_USER simulation_server
  15. ENV MYSQL_PASSWORD simulation_server
  16. ENV MYSQL_ROOT_PASSWORD simulation_server
  17.  
  18. # copy over migrations
  19. COPY assets/migrations /migrations
  20.  
  21. # copy migration script to the init dir
  22. # to be executed on the first run of a container
  23. COPY build/docker/scripts/migrate.sh /docker-entrypoint-initdb.d/migrate.sh
  24.  
  25. EXPOSE 3306 33060
  26.  
  27. ENTRYPOINT ["docker-entrypoint.sh"]
  28. CMD ["mysqld"]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top