Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sirikon committed Nov 18, 2023
1 parent 07a78ce commit 622308f
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 13 deletions.
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "BilboStack App",
"dockerComposeFile": [
"../docker-compose.yml",
"../modules/docker/docker-compose.yml",
"../modules/docker/docker-compose.dev-container.yml"
],
"service": "venue",
"overrideCommand": true,
"workspaceFolder": "/app",
"customizations": {
"vscode": {
"extensions": [
"redhat.vscode-yaml",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.black-formatter",
"denoland.vscode-deno"
]
}
}
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"[python]": {
"editor.tabSize": 4
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"files.exclude": {
"**/__pycache__": true
}
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Empty docker-compose file to force
# project directory on VSCode Dev Containers
services: {}
5 changes: 0 additions & 5 deletions docker/docker-compose.build.yml

This file was deleted.

18 changes: 10 additions & 8 deletions docker/Dockerfile → modules/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
FROM debian:bullseye-slim AS build
# Install dependencies
FROM debian:bullseye-slim AS base
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3 curl git unzip ca-certificates bash \
python3 curl git unzip ca-certificates bash \
&& update-ca-certificates

# ASDF
RUN git clone --branch v0.10.2 --depth 1 https://github.com/asdf-vm/asdf.git /asdf
SHELL ["/bin/bash", "--rcfile", "/asdf/asdf.sh", "-ci"]
RUN asdf plugin add deno
RUN asdf plugin add nodejs
# Build everything
COPY .tool-versions .


FROM base AS vscode-devcontainer

FROM base AS build
WORKDIR /app
COPY .tool-versions .
RUN asdf install
COPY ./modules/server ./modules/server
COPY task .
RUN ./task build

# Final stage
FROM debian:bullseye-slim
FROM debian:bullseye-slim AS release
COPY --from=build /app/dist /app
WORKDIR /app
CMD ./venue
8 changes: 8 additions & 0 deletions modules/docker/docker-compose.dev-container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
venue:
build:
target: vscode-devcontainer
volumes:
- ./:/app
ports:
- 0.0.0.0:8000:8000
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
services:
venue:
image: ghcr.io/sirikon/bilbostack-app:${VENUE_TAG:-dev}
build:
dockerfile: ./modules/docker/Dockerfile

db:
image: postgres:12-bullseye
restart: always
Expand Down

0 comments on commit 622308f

Please sign in to comment.