-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from kochamaltki/docker
Docker
- Loading branch information
Showing
5 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
media/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ubuntu:trusty | ||
RUN sudo apt-get -y update | ||
RUN sudo apt-get -y upgrade | ||
RUN sudo apt-get install -y sqlite3 libsqlite3-dev curl | ||
WORKDIR /usr/src/backend | ||
SHELL ["/bin/bash", "-c"] | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
RUN ls -a /root | ||
RUN source "/root/.cargo/env" | ||
RUN /root/.cargo/bin/rustc -V | ||
RUN mkdir -p ./media/images | ||
RUN mkdir -p ./media/profile-pictures | ||
COPY . . | ||
RUN /usr/bin/sqlite3 projekt-db < setup.sql | ||
RUN ls -a | ||
RUN /root/.cargo/bin/cargo build | ||
CMD /root/.cargo/bin/cargo run |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3' | ||
|
||
services: | ||
backend: | ||
image: backend:latest | ||
container_name: backend | ||
ports: | ||
- "8000:8000" | ||
environment: | ||
- PUID=1000 | ||
- PGID=1000 | ||
volumes: | ||
- ./media:/usr/src/backend/media |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
sqlite3 projekt-db < setup.sql | ||
/usr/bin/sqlite3 projekt-db < setup.sql |