Skip to content

Instantly share code, notes, and snippets.

@frendhisaido
Last active September 13, 2018 08:34
Show Gist options
  • Save frendhisaido/0b0cb15426c85fc90e5c82764522547f to your computer and use it in GitHub Desktop.
Save frendhisaido/0b0cb15426c85fc90e5c82764522547f to your computer and use it in GitHub Desktop.
fusionauth docker-compose.yml
version: "2"
# links: 'db' will be used as mysql host url
# fusionauth/fusionauth-app:latest https://github.com/FusionAuth/fusionauth-containers/tree/master/docker/fusionauth/fusionauth-app
services:
app:
build: .
image: fusionauth-app:latest
links:
- "db"
ports:
- 9011:9011
- 9020:9020
- 9021:9021
tty: true
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: fusionauth
MYSQL_USER: root
MYSQL_PASSWORD: root
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_bin']
volumes:
db_data:
# FROM https://github.com/FusionAuth/fusionauth-containers/tree/master/docker/fusionauth/fusionauth-app/Dockerfile
# FusionAuth Dockerfile
#
# Example use: docker build -t fusionauth .
# Once built, to start: docker run -p 9011:9011 -it fusionauth
FROM ubuntu:18.04
LABEL description="Create an image running FusionAuth with embedded search engine. \
Installs FusionAuth Search, FusionAuth App"
MAINTAINER FusionAuth <[email protected]>
EXPOSE 9011 9020 9021
###### Install stuff we need ##########################
RUN apt-get update && apt-get install -y -q \
unzip \
wget \
curl
###### Get and install the FusionAuth Bundles #######################
RUN export FUSIONAUTH_VERSION=$(curl -s https://www.inversoft.com/api/fusionauth/latest-version) && wget --quiet https://storage.googleapis.com/inversoft_products_j098230498/products/fusionauth/${FUSIONAUTH_VERSION}/fusionauth-app_${FUSIONAUTH_VERSION}-1_all.deb && dpkg -i fusionauth-app_${FUSIONAUTH_VERSION}-1_all.deb
RUN export FUSIONAUTH_VERSION=$(curl -s https://www.inversoft.com/api/fusionauth/latest-version) && wget --quiet https://storage.googleapis.com/inversoft_products_j098230498/products/fusionauth/${FUSIONAUTH_VERSION}/fusionauth-search_${FUSIONAUTH_VERSION}-1_all.deb && dpkg -i fusionauth-search_${FUSIONAUTH_VERSION}-1_all.deb
###### start #########################################
CMD service fusionauth-search start && service fusionauth-app start && tail -f /usr/local/fusionauth/logs/fusionauth-app.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment