Skip to content

Instantly share code, notes, and snippets.

@SagnikPradhan
Created March 16, 2022 10:21
Show Gist options
  • Select an option

  • Save SagnikPradhan/1ea992bb2972109b181f395034b76981 to your computer and use it in GitHub Desktop.

Select an option

Save SagnikPradhan/1ea992bb2972109b181f395034b76981 to your computer and use it in GitHub Desktop.
version: "3.9"
volumes:
caddy_data:
external: true
caddy_config:
services:
app:
env_file:
- .env
environment:
- API_PORT=4000
- WEB_PORT=3000
build: .
volumes:
- type: bind
source: .
target: /dewolume
caddy:
image: caddy:latest
ports:
- "80"
- "443"
environment:
- SITE_ADDRESS
- API_ADDRESS="app:4000"
- WEB_ADDRESS="app:3000"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- $PWD/site:/srv
- caddy_data:/data
- caddy_config:/config
redis:
image: "bitnami/redis:latest"
ports:
- "${DATABASE__REDIS_PORT}:6379"
environment:
- ALLOW_EMPTY_PASSWORD="yes"
volumes:
- ./data/redis:/bitname/redis/data
db:
image: mysql:latest
ports:
- "${DATABASE__MYSQL_PORT}:3306"
environment:
- MYSQL_ROOT_PASSWORD="${DATABASE__MYSQL_PASSWORD}"
volumes:
- ./data/mysql:/var/lib/mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment