Web Client #11
@ -71,4 +71,7 @@ COPY --from=builder --chown=nobody:root /app/priv /app/priv
|
||||
|
||||
USER nobody
|
||||
|
||||
EXPOSE 8080
|
||||
EXPOSE 34355
|
||||
|
||||
CMD /app/bin/chessh eval "Chessh.Release.migrate" && /app/bin/chessh start
|
||||
|
@ -4,7 +4,8 @@ datestamp=$(date +%Y%m%d-%H%M)
|
||||
env_file=.env.prod
|
||||
project_name=chessh
|
||||
port=8080
|
||||
host=127.0.0.1
|
||||
ssh_port=34355
|
||||
host=0.0.0.0
|
||||
|
||||
container_names=("chessh-database" "chessh-server" "chessh-frontend")
|
||||
|
||||
@ -39,6 +40,7 @@ docker run \
|
||||
--env-file $env_file \
|
||||
--network $project_name \
|
||||
--name $project_name-server \
|
||||
--publish "${host}:${ssh_port}:${ssh_port}/tcp" \
|
||||
--net-alias server \
|
||||
chessh/server
|
||||
|
||||
|
@ -20,7 +20,7 @@ RUN npm run build
|
||||
FROM nginx:alpine
|
||||
|
||||
EXPOSE 80
|
||||
COPY nginx.conf /etc/nginx/conf.d/
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /usr/app/build /usr/share/nginx/html
|
||||
|
||||
RUN chown -R nginx:nginx /usr/share/nginx/html
|
||||
|
@ -1,3 +1,7 @@
|
||||
upstream server {
|
||||
server server:8080;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
@ -7,7 +11,8 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~ ^/api(/.*|$) {
|
||||
proxy_pass http://server:8080/$1;
|
||||
location /api/ {
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://server/;
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,7 @@ import logo from "./assets/chessh_sm.svg";
|
||||
import { useAuthContext } from "./context/auth_context";
|
||||
|
||||
export const Root = () => {
|
||||
const { signedIn, setUserId, setSignedIn, setSessionOver, signOut } =
|
||||
useAuthContext();
|
||||
const { signedIn, signOut } = useAuthContext();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
Loading…
Reference in New Issue
Block a user