-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
42 lines (35 loc) · 1.09 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM golang
ADD . /go/src/github.com/assetto-corsa-web/acweb/
COPY configs /config
WORKDIR /go/src/github.com/assetto-corsa-web/acweb/
# install node
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl libc6-i386 lib32z1 lib32gcc1
RUN curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh && bash nodesource_setup.sh
RUN apt-get install -y nodejs
# build backend
ENV GOPATH=/go
RUN go build -ldflags "-s -w" main.go
# build frontend
RUN cd /go/src/github.com/assetto-corsa-web/acweb/public && npm install && npm run build
# configure and run
ENV ACWEB_HOST=:8080
ENV ACWEB_LOGDIR=/logs
ENV ACWEB_LOGLEVEL=info
ENV ACWEB_INSTANCE_LOGDIR=/instance_logs
ENV ACWEB_CONFIG_DIR=/config
ENV ACWEB_TLS_PRIVATE_KEY=
ENV ACWEB_TLS_CERT=
ENV ACWEB_DB_USER=root
ENV ACWEB_DB_PASSWORD=
ENV ACWEB_DB_HOST=
ENV ACWEB_DB=acweb
ENV ACWEB_DB_PORT=5432
ENV ACWEB_DB_SSLMODE=disable
ENV ACWEB_DB_SSL_CERT=
ENV ACWEB_DB_SSL_KEY=
ENV ACWEB_DB_ROOT_CERT=
# expose Assetto Corsa folder
VOLUME ["/ac", "/logs", "/instance_logs", "/config"]
CMD ["/go/src/github.com/assetto-corsa-web/acweb/main"]