File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ RUN CGO_ENABLED=1 CC=gcc go build -o /app/app main.go
10
10
11
11
FROM alpine:3.10
12
12
13
- # Install libc6-compat for go-sqlite3 use
13
+ # Install for go-sqlite3 use
14
14
RUN apk --update upgrade \
15
15
&& apk add --no-cache sqlite \
16
16
&& rm -rf /var/cache/apk/*
Original file line number Diff line number Diff line change @@ -103,6 +103,6 @@ curl -L -X GET http://localhost/<url_id> => REDIRECT to original URL # HTTP 301
103
103
- Run the docker image
104
104
`sudo docker run -p 0.0.0.0:7600:7600 steveyiyo/url-shortener`
105
105
106
- ## TODO
106
+ ## docker-compose
107
107
108
- - [ ] docker-compose.yaml
108
+ - ` docker-compose up -d`
Original file line number Diff line number Diff line change @@ -10,5 +10,8 @@ services:
10
10
ports :
11
11
- 0.0.0.0:7600:7600
12
12
volumes :
13
+ # Mount the config file
13
14
- " /opt/url/.env:/app/.env"
14
- - " /opt/url/config.yaml:/app/config.yaml"
15
+ - " /opt/url/config.yaml:/app/config.yaml"
16
+ # Mount the database volume
17
+ - " /opt/url/data.db:/app/data.db"
You can’t perform that action at this time.
0 commit comments