Skip to content

Commit

Permalink
Merge pull request #7 from Zenfulcode/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
gkhaavik authored Oct 20, 2024
2 parents df12c52 + d80e855 commit ba9e3f1
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
services:
watchtower:
image: containrrr/watchtower
command:
- "--label-enable"
- "--interval"
- "30"
- "--rolling-restart"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
reverse-proxy:
image: traefik:v3.1
command:
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=commercify@zenfulcode.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
ports:
- "80:80"
- "8080:8080"
- "443:443"
volumes:
- letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock
mysql-db:
image: docker.io/bitnami/mysql:8.4
container_name: mysql-db
env_file: .env
environment:
ALLOW_EMPTY_PASSWORD: "no"
MYSQL_DATABASE: commercifydb
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
expose:
- 3306
volumes:
- mysql-data:/bitnami/mysql/data
# - ./mysql-init-scripts:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "/opt/bitnami/scripts/mysql/healthcheck.sh"]
interval: 15s
timeout: 5s
retries: 6

commercifyweb:
image: ghcr.io/zenfulcode/commercifyweb:dev
env_file: .env
labels:
- "traefik.enable=true"
- "traefik.http.routers.commercify.rule=Host(`commercify.app`)"
- "traefik.http.routers.commercify.entrypoints=websecure"
- "traefik.http.routers.commercify.tls.certresolver=myresolver"
- "com.centurylinklabs.watchtower.enable=true"
environment:
- NEXT_PUBLIC_COMMERCIFY_API_URL=https://commercify.app:6091/api/v1
# deploy:
# mode: replicated
# replicas: 3
depends_on:
- commercify

commercify:
image: ghcr.io/zenfulcode/commercify:dev
env_file: .env
labels:
- "traefik.enable=true"
- "traefik.http.routers.commercify-api.rule=Host(`api.commercify.app`)"
- "traefik.http.routers.commercify-api.entrypoints=websecure"
- "traefik.http.routers.commercify-api.tls.certresolver=myresolver"
- "com.centurylinklabs.watchtower.enable=true"
environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_DATASOURCE_URL=${SPRING_DATASOURCE_URL}
- SPRING_DATASOURCE_USERNAME=${SPRING_DATASOURCE_USERNAME}
- SPRING_DATASOURCE_PASSWORD=${SPRING_DATASOURCE_PASSWORD}
- STRIPE_TEST_SECRET=${STRIPE_TEST_SECRET}
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
expose:
- 6091
# deploy:
# mode: replicated
# replicas: 3
depends_on:
mysql-db:
condition: service_healthy

volumes:
letsencrypt:
mysql-data:
driver: local

0 comments on commit ba9e3f1

Please sign in to comment.