Skip to content

Commit

Permalink
#94 merge fly project into the confetti template
Browse files Browse the repository at this point in the history
  • Loading branch information
Reindert Vetter committed Jan 29, 2021
1 parent 22c693f commit 45d0eca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ RUN apt-get install -y \
libpng-dev \
python2 \
wget \
htop \
&& mkdir -p ~/.gnupg \
&& chmod 600 ~/.gnupg \
&& echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
Expand All @@ -53,11 +54,11 @@ RUN cd /usr/local && wget --progress=bar:force:noscroll https://golang.org/dl/go
tar -C /usr/local -xzf go$GOVERSION.linux-amd64.tar.gz
ENV PATH PATH=$PATH:/usr/local/go/bin

RUN groupadd --force -g $WWWGROUP fly
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 fly
RUN groupadd --force -g $WWWGROUP confetti
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 confetti
RUN mkdir $GOCACHE $GOMODCACHE
RUN chown -R fly:fly $GOCACHE $GOMODCACHE
USER fly
RUN chown -R confetti:confetti $GOCACHE $GOMODCACHE
USER confetti

RUN go get github.com/cespare/reflex
CMD ~/go/bin/reflex -r '(\.go$|\.gohtml$|go\.mod$|\.env$)' -s -- sh -c "go run -race main.go"
32 changes: 16 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# For more information: https://confetti-framework.github.io/docs/docs/packages/fly
# For more information: https://confetti-framework.github.io/docs/docs/get-started/installation.html#docker
version: '3'
services:
confetti.local:
Expand All @@ -7,7 +7,7 @@ services:
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP:-20}'
image: fly/app
image: confetti/app
ports:
- '${APP_PORT:-80}:8080'
environment:
Expand All @@ -18,7 +18,7 @@ services:
volumes:
- '.:/var/www/html'
networks:
- fly
- confetti
depends_on:
- mysql
# - pgsql
Expand All @@ -29,7 +29,7 @@ services:
# volumes:
# - '/dev/shm:/dev/shm'
# networks:
# - fly
# - confetti
mysql:
image: 'mysql:8.0'
ports:
Expand All @@ -41,9 +41,9 @@ services:
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
- 'flymysql:/var/lib/mysql'
- 'confetti_mysql:/var/lib/mysql'
networks:
- fly
- confetti
healthcheck:
test: ["CMD", "mysqladmin", "ping"]
# pgsql:
Expand All @@ -56,41 +56,41 @@ services:
# POSTGRES_USER: '${DB_USERNAME}'
# POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
# volumes:
# - 'flypostgresql:/var/lib/postgresql/data'
# - 'confetti_postgresql:/var/lib/postgresql/data'
# networks:
# - fly
# - confetti
# healthcheck:
# test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'flyredis:/data'
- 'confetti_redis:/data'
networks:
- fly
- confetti
healthcheck:
test: ["CMD", "redis-cli", "ping"]
# memcached:
# image: 'memcached:alpine'
# ports:
# - '11211:11211'
# networks:
# - fly
# - confetti
mailhog:
image: 'mailhog/mailhog:latest'
ports:
- '${FORWARD_MAILHOG_PORT:-1025}:1025'
- '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
networks:
- fly
- confetti
networks:
fly:
confetti:
driver: bridge
volumes:
flymysql:
confetti_mysql:
driver: local
# flypostgresql:
# confetti_postgresql:
# driver: local
flyredis:
confetti_redis:
driver: local

0 comments on commit 45d0eca

Please sign in to comment.