forked from TWS/kalkutago
Temporarily configure docker-compose for dev/debug
This commit is contained in:
parent
526990704b
commit
76cb73bb03
7
Makefile
7
Makefile
|
@ -4,12 +4,9 @@ all: start-server
|
|||
client/dist/index.html:
|
||||
cd client; yarn && yarn build
|
||||
|
||||
build-client: client/dist/index.html
|
||||
build-client: client/dist/index.html
|
||||
|
||||
server/public/: client/dist/index.html
|
||||
rsync -a client/dist/ server/public/
|
||||
|
||||
start-server: server/public/
|
||||
start-server: build-client
|
||||
docker compose up --build -d
|
||||
|
||||
clean:
|
||||
|
|
|
@ -2,7 +2,10 @@ version: "3.5"
|
|||
|
||||
services:
|
||||
server:
|
||||
build: ./server
|
||||
# build: ./server
|
||||
build:
|
||||
context: ./server
|
||||
dockerfile: Dockerfile.debug
|
||||
networks:
|
||||
- web
|
||||
- internal
|
||||
|
@ -16,6 +19,8 @@ services:
|
|||
ports:
|
||||
# TODO remove in prod
|
||||
- 8000:8000
|
||||
volumes:
|
||||
- ./client/dist:/src/public:ro
|
||||
database:
|
||||
image: postgres
|
||||
environment:
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
FROM rustlang/rust:nightly-bullseye-slim
|
||||
RUN apt-get update &&\
|
||||
apt-get install sqlite3 &&\
|
||||
apt-get clean &&\
|
||||
rm -rf /var/lib/apt/lists
|
||||
WORKDIR /src
|
||||
ADD Cargo.toml Cargo.lock /src/
|
||||
RUN echo "fn main() {}" > dummy.rs &&\
|
||||
|
@ -8,5 +12,5 @@ ADD src/ src/
|
|||
RUN rm dummy.rs &&\
|
||||
sed -i "s:dummy.rs:src/main.rs:" Cargo.toml
|
||||
RUN cargo build --release
|
||||
ADD public/ public/
|
||||
# ADD public/ public/
|
||||
CMD ["target/release/kalkulog-server"]
|
||||
|
|
17
server/Dockerfile.debug
Normal file
17
server/Dockerfile.debug
Normal file
|
@ -0,0 +1,17 @@
|
|||
FROM rustlang/rust:nightly-bullseye-slim
|
||||
RUN apt-get update &&\
|
||||
apt-get install -yq sqlite3 &&\
|
||||
apt-get clean &&\
|
||||
rm -rf /var/lib/apt/lists
|
||||
WORKDIR /src
|
||||
ADD Cargo.toml Cargo.lock /src/
|
||||
RUN echo "fn main() {}" > dummy.rs &&\
|
||||
sed -i "s:src/main.rs:dummy.rs:" Cargo.toml
|
||||
RUN cargo build --release
|
||||
ADD src/ src/
|
||||
RUN rm dummy.rs &&\
|
||||
sed -i "s:dummy.rs:src/main.rs:" Cargo.toml
|
||||
RUN cargo build --release
|
||||
# ADD public/ public/
|
||||
CMD ["target/release/kalkulog-server"]
|
||||
|
Loading…
Reference in a new issue