Skip to content

Commit b5dd2ba

Browse files
committed
Update docker files
1 parent 575506a commit b5dd2ba

File tree

3 files changed

+77
-6
lines changed

3 files changed

+77
-6
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ RUN curl -sL https://github.com/goreleaser/goreleaser/releases/download/v0.108.0
1414

1515
RUN mv Rabbit rabbit
1616

17-
# Build a small image
18-
FROM alpine:3.9.4
19-
RUN apk --no-cache add ca-certificates
17+
FROM golang:1.12.5
18+
19+
ENV GO111MODULE=on
2020

2121
COPY --from=builder /app/configs /app/configs
2222
COPY --from=builder /app/var/logs /app/var/logs
@@ -29,4 +29,4 @@ WORKDIR /app
2929

3030
EXPOSE 8080
3131

32-
CMD ["./rabbit", "--config", "/app/configs/config.prod.yml"]
32+
CMD ["./rabbit", "--config", "/app/configs/config.docker.yml"]

config.docker.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# General App Configs
2+
app:
3+
# Env mode (dev or prod)
4+
mode: dev
5+
# HTTP port
6+
port: 8080
7+
# App URL
8+
domain: http://127.0.0.1:8080
9+
# TLS configs
10+
tls:
11+
status: off
12+
pemPath: cert/server.pem
13+
keyPath: cert/server.key
14+
15+
# Redis Configs
16+
redis:
17+
addr: redis:6379
18+
password:
19+
db: 0
20+
21+
# Message Broker Configs
22+
broker:
23+
# Broker driver (native or redis)
24+
driver: native
25+
# Native driver configs
26+
native:
27+
# Queue max capacity
28+
capacity: 50
29+
# Number of concurrent workers
30+
workers: 1
31+
# Redis Driver Configs
32+
redis:
33+
channel: rabbit
34+
35+
# Log configs
36+
log:
37+
# Log level, it can be debug, info, warn, error, panic, fatal
38+
level: debug
39+
# output can be stdout or abs path to log file /var/logs/rabbit.log
40+
output: /app/var/logs/rabbit.log
41+
# Format can be json or text
42+
format: json
43+
44+
# Release configs
45+
releases:
46+
# Releases absolute path
47+
path: /app/var/releases
48+
name: "[.Tag]"
49+
50+
# Build configs
51+
build:
52+
# Build absolute path
53+
path: /app/var/build
54+
55+
# Application Database
56+
database:
57+
# Database driver (redis)
58+
driver: redis
59+
# Redis Driver Configs
60+
redis:
61+
hash_prefix: rabbit_
62+
63+
# Third Party API Integration
64+
integrations:
65+
# Github Configs
66+
github:
67+
# Webhook Secret (From Repo settings page > Webhooks)
68+
webhook_secret: Pz2ufk7r5BTjnkOo
69+
# whether to use ssh or https to clone
70+
clone_with: https

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ services:
88
web:
99
image: "clivern_rabbit:0.0.1"
1010
build: .
11-
command: './rabbit --config /app/configs/config.prod.yml'
11+
command: './rabbit --config /app/configs/config.docker.yml'
1212
ports:
1313
- "8080:8080"
1414
depends_on:
1515
- redis
1616
volumes:
17+
- '~/.ssh:/root/.ssh'
1718
- './var:/app/var'
1819
- './configs:/app/configs'
1920
restart: always
2021
healthcheck:
21-
test: './rabbit --config /app/configs/config.prod.yml --exec health'
22+
test: './rabbit --config /app/configs/config.docker.yml --exec health'
2223
interval: 5s
2324
timeout: 2s
2425
retries: 5

0 commit comments

Comments
 (0)