Repository navigation
Expand file tree
/
Copy pathDockerfile_gcloud
More file actions
60 lines (46 loc) · 1.6 KB
/
Copy pathDockerfile_gcloud
File metadata and controls
60 lines (46 loc) · 1.6 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# docker build . -f Dockerfile_gcloud -t chrisjbishop155/oas:latest
# docker push chrisjbishop155/oas:latest
from elixir:1.18.3
RUN apt-get update
# Certbot
RUN apt-get install -y python3 python3-venv libaugeas0
RUN python3 -m venv /opt/certbot/
RUN /opt/certbot/bin/pip install --upgrade pip
RUN /opt/certbot/bin/pip install certbot certbot-nginx
RUN ln -s /opt/certbot/bin/certbot /usr/bin/certbot
# Node
# RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN curl -L https://deb.nodesource.com/nsolid_setup_deb.sh | bash -s -- 18
RUN apt-get install -y vim htop
RUN apt-get install -y nodejs
RUN apt-get install -y tmux
RUN apt-get install -y inotify-tools
RUN apt-get install -y nginx
ARG SUBDOMAIN=gcloud
ENV REACT_APP_ADMIN_URL=https://admin.${SUBDOMAIN}.oxfordshireacrosociety.co.uk
ENV REACT_APP_SERVER_URL=https://server.${SUBDOMAIN}.oxfordshireacrosociety.co.uk
ENV REACT_APP_PUBLIC_URL=https://www.${SUBDOMAIN}.oxfordshireacrosociety.co.uk
ENV DOMAIN=.${SUBDOMAIN}.oxfordshireacrosociety.co.uk
WORKDIR /app
COPY . .
WORKDIR /app/oas-web
RUN npm install
RUN npm run build
WORKDIR /app/oas-web-public
RUN npm install
RUN npm run build
WORKDIR /app
RUN mix local.hex --force
RUN mix deps.get --force
RUN mix local.rebar --force
ARG MIX_ENV=gcloud
ENV MIX_ENV=${MIX_ENV}
RUN mix compile
ENV ELIXIR_ERL_OPTIONS="-kernel shell_history enabled"
# RUN cp ./nginx/gcloud_nginx.conf /etc/nginx/nginx.conf
VOLUME [ "/dbs", "/dbs-backup" ]
# CMD ["iex"]
# CMD ["sleep", "86400"]
# CMD ["iex", "-S", "mix"]
ENTRYPOINT [ "./docker_gcloud.sh" ]
# CMD /bin/bash tmux new-session -d -s server 'iex -S mix phx.server'