Chore(docker): update Dockerfile (#87)
This commit is contained in:
1 parent
3eee5248c7
commit
71bdc53eb6
2 files changed
+3
-32
No files matched your search
@@ -7,6 +7,7 @@ RUN apk add --update --no-cache --no-progress make git \
|
|||||||
&& make server
|
&& make server
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
LABEL org.opencontainers.image.licenses=Apache-2.0
|
||||||
LABEL org.opencontainers.image.source="https://github.com/metatube-community/metatube-sdk-go"
|
LABEL org.opencontainers.image.source="https://github.com/metatube-community/metatube-sdk-go"
|
||||||
|
|
||||||
COPY --from=builder /src/build/metatube-server .
|
COPY --from=builder /src/build/metatube-server .
|
||||||
@@ -23,4 +24,6 @@ ENV DB_MAX_OPEN_CONNS=0
|
|||||||
ENV DB_PREPARED_STMT=0
|
ENV DB_PREPARED_STMT=0
|
||||||
ENV DB_AUTO_MIGRATE=0
|
ENV DB_AUTO_MIGRATE=0
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
ENTRYPOINT ["/metatube-server"]
|
ENTRYPOINT ["/metatube-server"]
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
version: "3"
|
|
||||||
services:
|
|
||||||
metatube:
|
|
||||||
image: metatube/metatube-server:latest
|
|
||||||
container_name: metatube
|
|
||||||
ports:
|
|
||||||
- 8080:8080
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
- postgres
|
|
||||||
environment:
|
|
||||||
- HTTP_PROXY=
|
|
||||||
- HTTPS_PROXY=
|
|
||||||
volumes:
|
|
||||||
- run:/var/run
|
|
||||||
command: -dsn "postgres://metatube:metatube@/metatube?host=/var/run/postgresql" -port 8080 -db-auto-migrate -db-prepared-stmt
|
|
||||||
|
|
||||||
postgres:
|
|
||||||
image: postgres:15-alpine
|
|
||||||
container_name: metatube-postgres
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- POSTGRES_USER=metatube
|
|
||||||
- POSTGRES_PASSWORD=metatube
|
|
||||||
- POSTGRES_DB=metatube
|
|
||||||
volumes:
|
|
||||||
- ./db:/var/lib/postgresql/data
|
|
||||||
- run:/var/run
|
|
||||||
command: "-c TimeZone=Asia/Shanghai -c log_timezone=Asia/Shanghai -c listen_addresses='' -c unix_socket_permissions=0777"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
run:
|
|
||||||
Reference in new issue
Block a user