Skip to content

Commit

Permalink
Docker shit AGAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
MotorTruck1221 committed Dec 21, 2024
1 parent 5c50638 commit 87d5b54
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ config.toml
# Stupidness
~/

# Docker files that aren't needed in the real repo
docker-compose.local.yml
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ COPY package*.json .
COPY deno.jsonc .
COPY . .

ARG SEO
RUN apt update
RUN apt install -y python3 python3-pip libssl-dev build-essential python3-dev nodejs
RUN cp -n config.example.toml config.toml
RUN deno install --allow-scripts
RUN deno task build
RUN if [ -z "$SEO" ]; then deno task build; else deno task build:seo; fi
RUN export TERM=xterm-256color
ENV PORT="8000"
VOLUME /app
Expand Down
5 changes: 5 additions & 0 deletions config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ games = true
[server]
wisp = true
port = 8000

[seo]
enabled = false
both = false
domain = "http://localhost:8000"
59 changes: 59 additions & 0 deletions docker-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: '3'

# This file is for building the docker images and pushing them to the registry. You can safely ignore this

services:
incognito:
image: motortruck1221/incognito:latest
build:
context: .
dockerfile: Dockerfile
container_name: incognito
restart: unless-stopped
ports:
- '8081:8000'
volumes:
- ./config.toml:/app/config.toml
incognito-versioned:
image: motortruck1221/incognito:1.1.3
build:
context: .
dockerfile: Dockerfile
container_name: incognito
restart: unless-stopped
ports:
- '8081:8000'
volumes:
- ./config.toml:/app/config.toml
incognito-seo:
image: motortruck1221/incognito:latest-seo
build:
context: .
dockerfile: Dockerfile
args:
- SEO=true
container_name: incognito
restart: unless-stopped
ports:
- '8081:8000'
environment:
- SEO=true
- BOTH=true
volumes:
- ./config.toml:/app/config.toml
incognito-seo-versioned:
image: motortruck1221/incognito:1.1.3-seo
build:
context: .
dockerfile: Dockerfile
args:
- SEO=true
container_name: incognito
restart: unless-stopped
ports:
- '8081:8000'
environment:
- SEO=true
- BOTH=true
volumes:
- ./config.toml:/app/config.toml
7 changes: 6 additions & 1 deletion docker-compose.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ services:
# The ports work like this: Host:Container (DO NOT MODIFY THE CONTAINER PORT)
- '8081:8000'
volumes:
- ./config.toml:/app/config.toml
- ./config.toml:/app/config.toml # this can be removed if you need the image to be stateless
#environment:
# - SEO=false - Enabled to turn on SEO in the build
# - BOTH=false - Use if you want both the SEO and non-seo versions
# - DOMAIN=https://incog.works - Use if you want SEO (when using the both option) to work properly

# The below allows you to change any of the `buildOpts` config options and use them.
#command:
# - bstart - Use if using Fastify
Expand Down
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ services:
# The ports work like this: Host:Container (DO NOT MODIFY THE CONTAINER PORT)
- '8081:8000'
volumes:
- ./config.toml:/app/config.toml
- ./config.toml:/app/config.toml # This can be removed if you need the image to be stateless
#environment:
# - SEO=false - Enabled to turn on SEO in the build
# - BOTH=false - Use if you want both the SEO and non-seo versions
# - DOMAIN=https://incog.works - Use if you want SEO (when using the both option) to work properly

# The below allows you to change any of the `buildOpts` config options and use them.
#command:
# - bstart - Use if using Fastify
Expand Down

0 comments on commit 87d5b54

Please sign in to comment.