Skip to content

Commit

Permalink
Add docker-compose support
Browse files Browse the repository at this point in the history
(cherry picked from commit fca3803)
  • Loading branch information
CareyWang authored and zhongfly committed Sep 25, 2020
1 parent dcfde3d commit 390e505
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sub-web-services/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SUBWEB_PORT=58080

MYURLS_PORT=8002
MYURLS_DOMAIN=example.com
MYURLS_TTL=180
25 changes: 25 additions & 0 deletions sub-web-services/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: "3"
services:
subweb:
build: ../.
container_name: subweb
restart: always
ports:
- "${SUBWEB_PORT}:80"

myurls:
image: "careywong/myurls:latest"
container_name: myurls
restart: always
ports:
- "${MYURLS_PORT}:8002"
depends_on:
- myurls-redis
entrypoint: ["/app/myurls", "-domain", "${MYURLS_DOMAIN}", "-conn", myurls-redis:6379, "-ttl", "${MYURLS_TTL}"]

myurls-redis:
image: "redis:5"
container_name: myurls-redis
restart: always
expose:
- "6379"

0 comments on commit 390e505

Please sign in to comment.