Last active
July 23, 2021 07:01
-
-
Save System-Glitch/59a6e9e67783a29586eaa5a6dbfab3aa to your computer and use it in GitHub Desktop.
Goyave development docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
api: | |
build: . | |
restart: always | |
networks: | |
- goyave-backend | |
ports: | |
- '8080:8080' | |
depends_on: | |
- mariadb | |
volumes: | |
- .:/app | |
mariadb: | |
image: mariadb | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: goyave | |
MYSQL_USER: goyave | |
MYSQL_PASSWORD: secret | |
networks: | |
- goyave-backend | |
restart: on-failure | |
volumes: | |
- databaseVolume:/var/lib/mysql | |
healthcheck: | |
test: ["CMD", 'mysqladmin ping'] | |
interval: 10s | |
timeout: 10s | |
retries: 100 | |
volumes: | |
databaseVolume: {} | |
networks: | |
goyave-backend: | |
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.15-alpine | |
LABEL maintainer="Jérémy LAMBERT (SystemGlitch) <[email protected]>" | |
RUN apk update && apk upgrade && apk add --no-cache git openssh | |
RUN go get github.com/cespare/reflex | |
ENV DOCKERIZE_VERSION v0.6.1 | |
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
&& tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
&& rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz | |
WORKDIR /app | |
EXPOSE 8080 | |
CMD dockerize -wait tcp://mariadb:3306 reflex -s -- sh -c 'go run kernel.go' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment