Skip to content

Commit

Permalink
Merge pull request #3 from compsoc-edinburgh/launch
Browse files Browse the repository at this point in the history
  • Loading branch information
yutotakano authored Dec 1, 2024
2 parents bd490f9 + e64cc59 commit b5099ea
Show file tree
Hide file tree
Showing 49 changed files with 10,456 additions and 786 deletions.
3 changes: 3 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ADMIN_LOGIN=admin
COMPSOC_LEADERBOARD_JOIN_CODE=123123-123123123
CCSIG_LEADERBOARD_JOIN_CODE=123123-14242424
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
build
.cache
data
.DS_Store
.env.production
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
29 changes: 12 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
FROM trafex/php-nginx:3.6.0
FROM node:23 AS build
WORKDIR /app

COPY index.html /var/www/html/index.html
COPY keep_me_updated.php /var/www/html/keep_me_updated.php
COPY compiled.css /var/www/html/compiled.css
COPY ./package.json /app/package.json
COPY ./yarn.lock /app/yarn.lock

# Remove the default files
RUN rm /var/www/html/index.php
RUN rm /var/www/html/test.html
RUN yarn install

# Temporarily become root since the trafek/php-nginx image sets the user to nobody
# which can't create or chown files
USER root
COPY ./src /app/src
COPY ./vite.config.ts /app/vite.config.ts
COPY ./tailwind.config.ts /app/tailwind.config.ts
COPY ./tsconfig.json /app/tsconfig.json
COPY ./postcss.config.mjs /app/postcss.config.mjs
RUN yarn build

RUN mkdir -p /etc/adventure
RUN touch /etc/adventure/emails.txt
RUN chmod 0777 /etc/adventure/emails.txt

USER nobody

EXPOSE 8080
CMD ["yarn", "serve"]
Loading

0 comments on commit b5099ea

Please sign in to comment.