Files
levelfly/compose.yml
3wc 7925506964
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
chore: publish 1.0.2+1.9.3 release
2026-01-24 22:59:21 -05:00

105 lines
2.6 KiB
YAML

---
x-environment:
&default-env
# Core settings
- APP_ENV=production
- APP_NAME=levelfly
- BUNDLE_WITHOUT=development:test
- LANG=en_US.UTF-8
- LOG_LEVEL=info
- RACK_ENV=production
- RAILS_ENV=production
- RAILS_LOG_TO_STDOUT=true
- RAILS_SERVE_STATIC_FILES=true
- SECRET_KEY_BASE
- DATABASE_HOST=${STACK_NAME}_db
- DATABASE_USERNAME=levelfly
- DATABASE_PASSWORD=levelfly
- DATABASE_PORT=5432
- DATABASE_NAME=levelfly
- PUSHER_URL
- SUPPORT_EMAIL
- URL=https://$DOMAIN
# Co-op Cloud specific
- DOMAIN
# Email
- SMTP_HOST
- SMTP_PORT
- SMTP_USERNAME
- SMTP_PASSWORD
- SMTP_DOMAIN
- MAILER_DEFAULT_URL=$DOMAIN
# S3 file storage
- S3_PROTOCOL=https
- S3_REGION
- S3_BUCKET
- S3_ACCESS_KEY_ID
- S3_SECRET_ACCESS_KEY
- S3_HOST_NAME
- S3_ENDPOINT
- S3_FORCE_PATH_STYLE
- S3_PATH
# Newrelic error logging
- NEW_RELIC_LOG=stdout
- NEW_RELIC_AGENT_ENABLED=${NEW_RELIC_AGENT_ENABLED:-false}"
- NEW_RELIC_LICENSE_KEY
- NEW_RELIC_APP_NAME
services:
app:
image: neuronicgames/levelfly:1.9.3
environment: *default-env
depends_on:
- db
networks:
- proxy
- internal
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
## Redirect from EXTRA_DOMAINS to DOMAIN
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=1.0.2+1.9.3"
jobs:
image: neuronicgames/levelfly:1.9.3
command: bundle exec rake jobs:work
environment: *default-env
depends_on:
- app
- db
networks:
- internal
- proxy
deploy:
resources:
limits:
memory: 1024m
db:
image: postgres:13-alpine
environment:
POSTGRES_DB: levelfly
POSTGRES_USER: levelfly
POSTGRES_PASSWORD: levelfly
networks:
- internal
healthcheck:
test: ["CMD", "pg_isready", "-U", "levelfly"]
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
internal:
proxy:
external: true
volumes:
postgres_data: