Created
March 25, 2024 10:21
-
-
Save tluyben/888408b9105b059d7993df77ed38f7ad to your computer and use it in GitHub Desktop.
Codel docker-compose start
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
services: | |
codel: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
restart: always | |
ports: | |
- "5173:5173" | |
volumes: | |
- ./.env:/app/codel/backend/.env | |
- ./.env.local:/app/codel/frontend/.env.local | |
- /var/run/docker.sock:/var/run/docker.sock | |
db: | |
image: postgres | |
restart: always | |
environment: | |
POSTGRES_PASSWORD: root | |
POSTGRES_DB: codel | |
volumes: | |
- "./pg:/var/lib/postgresql/data" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:20.11.1-bookworm-slim | |
ENV NODE_ENV=development | |
WORKDIR /app | |
RUN apt update | |
RUN apt install -y build-essential | |
RUN apt install -y vim wget lynx curl mariadb-client git bash | |
RUN npm i -g ts-node | |
RUN npm i -g jest | |
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | |
# this is needed for docker-in-docker | |
RUN curl -sSL https://get.docker.com/ | sh | |
RUN wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz | |
#RUN wget https://go.dev/dl/go1.22.1.linux-arm64.tar.gz | |
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz | |
#RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.1.linux-arm64.tar.gz | |
RUN echo "export PATH=$PATH:/usr/local/go/bin" >> /root/.bashrc | |
RUN git clone https://github.com/semanser/codel.git | |
ENV DOCKER_API_VERSION=1.43 | |
WORKDIR /app/codel | |
COPY start-codel . | |
RUN chmod 755 start-codel | |
CMD [ "bash", "-c", "./start-codel" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PATH=$PATH:/usr/local/go/bin | |
cd backend | |
go run . & | |
cd ../frontend | |
yarn | |
yarn dev --host 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment